summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2013-04-17 16:32:30 +0200
committerRui Matos <tiagomatos@gmail.com>2013-04-17 16:54:47 +0200
commit07f2a15d580fc44abaa44759c8837f61fa0ab59f (patch)
treee3fee87d0c19f5122ae115c24effb803599719f2
parent12e3b8965d6d9275d1aaf6fe9a6e2ae7744aaa6a (diff)
downloadnautilus-07f2a15d580fc44abaa44759c8837f61fa0ab59f.tar.gz
query-editor: Don't grab focus if we already have it
Grabbing the focus to a GtkEntry causes its selection to be set which in turn causes it to reset the IM context. Avoid doing that when we already have the search entry focused to not mess the IM context. https://bugzilla.gnome.org/show_bug.cgi?id=698205
-rw-r--r--src/nautilus-query-editor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index 7c75f4b67..219fb93bd 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -197,7 +197,7 @@ nautilus_query_editor_grab_focus (GtkWidget *widget)
{
NautilusQueryEditor *editor = NAUTILUS_QUERY_EDITOR (widget);
- if (gtk_widget_get_visible (widget)) {
+ if (gtk_widget_get_visible (widget) && !gtk_widget_is_focus (editor->details->entry)) {
/* avoid selecting the entry text */
gtk_widget_grab_focus (editor->details->entry);
gtk_editable_set_position (GTK_EDITABLE (editor->details->entry), -1);