From: Jan Djärv Date: Tue, 29 Jul 2008 09:25:49 +0000 (+0000) Subject: * gtkutil.c (menu_nav_ended): Remove. X-Git-Tag: emacs-pretest-23.0.90~3828 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3f7ead30616edd64bf159b74dfd28a9c7ab1c648;p=emacs.git * gtkutil.c (menu_nav_ended): Remove. (create_menus): Remove signal connect for menu_nav_ended. --- diff --git a/src/ChangeLog b/src/ChangeLog index d7a0db2a3ed..ad37435c1d5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2008-07-29 Jan Djärv + + * xmenu.c (Fx_menu_bar_open_internal): Use activate_item signal to + open menu. + + * gtkutil.c (menu_nav_ended): Remove. + (create_menus): Remove signal connect for menu_nav_ended. + 2008-07-28 Chong Yidong * xdisp.c (redisplay_window): Check return value of diff --git a/src/gtkutil.c b/src/gtkutil.c index 65b67e3d241..140796a015e 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -2142,34 +2142,6 @@ xg_create_one_menuitem (item, f, select_cb, highlight_cb, cl_data, group) return w; } -/* Callback called when keyboard traversal (started by x-menu-bar-open) ends. - WMENU is the menu for which traversal has been done. DATA points to the - frame for WMENU. We must release grabs, some bad interaction between GTK - and Emacs makes the menus keep the grabs. */ - -static void -menu_nav_ended (wmenu, data) - GtkMenuShell *wmenu; - gpointer data; -{ - FRAME_PTR f = (FRAME_PTR) data; - - if (FRAME_X_OUTPUT (f)->menubar_widget) - { - GtkMenuShell *w = GTK_MENU_SHELL (FRAME_X_OUTPUT (f)->menubar_widget); - Display *dpy = FRAME_X_DISPLAY (f); - - BLOCK_INPUT; - gtk_menu_shell_deactivate (w); - gtk_menu_shell_deselect (w); - - XUngrabKeyboard (dpy, CurrentTime); - XUngrabPointer (dpy, CurrentTime); - UNBLOCK_INPUT; - } -} - - static GtkWidget *create_menus P_ ((widget_value *, FRAME_PTR, GCallback, GCallback, GCallback, int, int, int, GtkWidget *, xg_menu_cb_data *, char *)); @@ -2235,12 +2207,6 @@ create_menus (data, f, select_cb, deactivate_cb, highlight_cb, } else wmenu = gtk_menu_bar_new (); - /* Fix up grabs after keyboard traversal ends. */ - g_signal_connect (G_OBJECT (wmenu), - "selection-done", - G_CALLBACK (menu_nav_ended), - f); - /* Put cl_data on the top menu for easier access. */ cl_data = make_cl_data (cl_data, f, highlight_cb); g_object_set_data (G_OBJECT (wmenu), XG_FRAME_DATA, (gpointer)cl_data);