Only cancel if the menu was active. (#314298, Christian Persch, analysis

2005-08-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenu.c (gtk_menu_grab_notify): Only cancel if the menu
	was active.  (#314298, Christian Persch, analysis by Mark McLoughlin)
This commit is contained in:
Matthias Clasen 2005-08-29 14:53:45 +00:00 committed by Matthias Clasen
parent e7f084dcf2
commit 9eb5ea7dd3
3 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-08-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenu.c (gtk_menu_grab_notify): Only cancel if the menu
was active. (#314298, Christian Persch, analysis by Mark McLoughlin)
2005-08-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconcache.c (_gtk_icon_cache_get_icon): Remove an

View File

@ -1,3 +1,8 @@
2005-08-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenu.c (gtk_menu_grab_notify): Only cancel if the menu
was active. (#314298, Christian Persch, analysis by Mark McLoughlin)
2005-08-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconcache.c (_gtk_icon_cache_get_icon): Remove an

View File

@ -4419,7 +4419,7 @@ gtk_menu_grab_notify (GtkWidget *widget,
if (!was_grabbed)
{
if (!GTK_IS_MENU_SHELL (grab))
if (GTK_MENU_SHELL (widget)->active && !GTK_IS_MENU_SHELL (grab))
gtk_menu_shell_cancel (GTK_MENU_SHELL (widget));
}
}