Mercurial > emacs
diff src/gtkutil.c @ 71160:070b40db0b2a
* gtkutil.c (menu_nav_ended): Check that menubar_widget is not NULL.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Fri, 02 Jun 2006 08:49:25 +0000 |
parents | 162d493b1e5c |
children | af91ff74c754 46b1096093f5 a8190f7e546e |
line wrap: on
line diff
--- a/src/gtkutil.c Fri Jun 02 06:34:41 2006 +0000 +++ b/src/gtkutil.c Fri Jun 02 08:49:25 2006 +0000 @@ -1981,16 +1981,20 @@ gpointer data; { FRAME_PTR f = (FRAME_PTR) data; - Display *dpy = FRAME_X_DISPLAY (f); - - BLOCK_INPUT; + + 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; + XUngrabKeyboard (dpy, CurrentTime); + XUngrabPointer (dpy, CurrentTime); + UNBLOCK_INPUT; + } }