emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/gtkutil.c


From: Jan Djärv
Subject: [Emacs-diffs] Changes to emacs/src/gtkutil.c
Date: Fri, 02 Jun 2006 08:48:28 +0000

Index: emacs/src/gtkutil.c
diff -u emacs/src/gtkutil.c:1.86 emacs/src/gtkutil.c:1.87
--- emacs/src/gtkutil.c:1.86    Thu Jun  1 06:40:43 2006
+++ emacs/src/gtkutil.c Fri Jun  2 08:48:27 2006
@@ -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;
+    }
 }
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]