[gedit/gnome-3-14] search: set the right focus
- From: Sebastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/gnome-3-14] search: set the right focus
- Date: Sat, 17 Jan 2015 21:00:09 +0000 (UTC)
commit bb02bf0b288226104b1f761393ce09e6819ce2e9
Author: Sebastien Lafargue <slafargue gnome org>
Date: Sat Jan 17 20:09:10 2015 +0100
search: set the right focus
In case of pointer's click outside of the search widget,
we need to set the focus to the widget under the cursor,
mostly usefull in case of multiple textviews in
a window ( tag groups ).
https://bugzilla.gnome.org/show_bug.cgi?id=742790
gedit/gedit-view-frame.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gedit/gedit-view-frame.c b/gedit/gedit-view-frame.c
index 7c57ee6..fb67e14 100644
--- a/gedit/gedit-view-frame.c
+++ b/gedit/gedit-view-frame.c
@@ -242,8 +242,6 @@ hide_search_widget (GeditViewFrame *frame,
gtk_text_buffer_delete_mark (buffer, frame->priv->start_mark);
frame->priv->start_mark = NULL;
}
-
- gtk_widget_grab_focus (GTK_WIDGET (frame->priv->view));
}
static gboolean
@@ -580,6 +578,8 @@ search_widget_key_press_event (GtkWidget *widget,
if (event->keyval == GDK_KEY_Tab)
{
hide_search_widget (frame, FALSE);
+ gtk_widget_grab_focus (GTK_WIDGET (frame->priv->view));
+
return GDK_EVENT_STOP;
}
@@ -607,6 +607,8 @@ search_widget_key_press_event (GtkWidget *widget,
}
hide_search_widget (frame, TRUE);
+ gtk_widget_grab_focus (GTK_WIDGET (frame->priv->view));
+
return GDK_EVENT_STOP;
}
@@ -956,6 +958,7 @@ search_entry_activate (GtkEntry *entry,
GeditViewFrame *frame)
{
hide_search_widget (frame, FALSE);
+ gtk_widget_grab_focus (GTK_WIDGET (frame->priv->view));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]