Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
71159:1d3e70a13b74 | 71160:070b40db0b2a |
---|---|
1979 menu_nav_ended (wmenu, data) | 1979 menu_nav_ended (wmenu, data) |
1980 GtkMenuShell *wmenu; | 1980 GtkMenuShell *wmenu; |
1981 gpointer data; | 1981 gpointer data; |
1982 { | 1982 { |
1983 FRAME_PTR f = (FRAME_PTR) data; | 1983 FRAME_PTR f = (FRAME_PTR) data; |
1984 Display *dpy = FRAME_X_DISPLAY (f); | 1984 |
1985 | 1985 if (FRAME_X_OUTPUT (f)->menubar_widget) |
1986 BLOCK_INPUT; | 1986 { |
1987 GtkMenuShell *w = GTK_MENU_SHELL (FRAME_X_OUTPUT (f)->menubar_widget); | 1987 GtkMenuShell *w = GTK_MENU_SHELL (FRAME_X_OUTPUT (f)->menubar_widget); |
1988 Display *dpy = FRAME_X_DISPLAY (f); | |
1989 | |
1990 BLOCK_INPUT; | |
1988 gtk_menu_shell_deactivate (w); | 1991 gtk_menu_shell_deactivate (w); |
1989 gtk_menu_shell_deselect (w); | 1992 gtk_menu_shell_deselect (w); |
1990 | 1993 |
1991 XUngrabKeyboard (dpy, CurrentTime); | 1994 XUngrabKeyboard (dpy, CurrentTime); |
1992 XUngrabPointer (dpy, CurrentTime); | 1995 XUngrabPointer (dpy, CurrentTime); |
1993 UNBLOCK_INPUT; | 1996 UNBLOCK_INPUT; |
1997 } | |
1994 } | 1998 } |
1995 | 1999 |
1996 | 2000 |
1997 static GtkWidget *create_menus P_ ((widget_value *, FRAME_PTR, GCallback, | 2001 static GtkWidget *create_menus P_ ((widget_value *, FRAME_PTR, GCallback, |
1998 GCallback, GCallback, int, int, int, | 2002 GCallback, GCallback, int, int, int, |