updated for version 7.0230
diff --git a/src/gui_gtk.c b/src/gui_gtk.c
index cdd645b..a1c4375 100644
--- a/src/gui_gtk.c
+++ b/src/gui_gtk.c
@@ -320,6 +320,19 @@
return image;
}
+/*ARGSUSED*/
+ static gint
+toolbar_button_focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
+{
+ /* When we're in a GtkPlug, we don't have window focus events, only widget focus.
+ * To emulate stand-alone gvim, if a button gets focus (e.g., <Tab> into GtkPlug)
+ * immediately pass it to mainwin.
+ */
+ if (gtk_socket_id != 0)
+ gtk_widget_grab_focus(gui.drawarea);
+
+ return TRUE;
+}
#endif /* FEAT_TOOLBAR && HAVE_GTK2 */
#if (defined(FEAT_TOOLBAR) && defined(HAVE_GTK2)) || defined(PROTO)
@@ -767,6 +780,10 @@
menu,
idx);
+ if (gtk_socket_id != 0)
+ gtk_signal_connect(GTK_OBJECT(menu->id), "focus_in_event",
+ GTK_SIGNAL_FUNC(toolbar_button_focus_in_event), NULL);
+
CONVERT_TO_UTF8_FREE(text);
CONVERT_TO_UTF8_FREE(tooltip);