try the find_widget_under_pointer() hack only if the menu item's parent is

2008-08-27  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpuimanager.c (gimp_ui_manager_item_key_press):
	try the find_widget_under_pointer() hack only if the menu item's
	parent is really a GtkMenu (not a GtkMenuBar). Fixes crash spotted
	by rubikcube.


svn path=/trunk/; revision=26796
This commit is contained in:
Michael Natterer 2008-08-27 19:36:41 +00:00 committed by Michael Natterer
parent 4e26c54f5a
commit 808ddd311b
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2008-08-27 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpuimanager.c (gimp_ui_manager_item_key_press):
try the find_widget_under_pointer() hack only if the menu item's
parent is really a GtkMenu (not a GtkMenuBar). Fixes crash spotted
by rubikcube.
2008-08-27 Lars-Peter Clausen <lars@metafoo.de>
* plug-ins/pygimp/pygimp-tile.c

View File

@ -944,7 +944,7 @@ gimp_ui_manager_item_key_press (GtkWidget *widget,
{
GtkWidget *menu_item = GTK_MENU_SHELL (widget)->active_menu_item;
if (! menu_item)
if (! menu_item && GTK_IS_MENU (widget))
{
GdkWindow *window = GTK_MENU (widget)->toplevel->window;
gint x, y;