menu: Avoid cancelling the menu on GTK+ grabs inside the GtkMenu

Allows again sliders as menuitems, broken by commit 9b032073.

https://bugzilla.gnome.org/show_bug.cgi?id=786029
This commit is contained in:
Carlos Garnacho 2017-08-10 11:56:47 +02:00 committed by Daniel Boles
parent d1d8658898
commit 26d8a6dfba

View File

@ -6183,7 +6183,8 @@ gtk_menu_grab_notify (GtkWidget *widget,
group = gtk_window_get_group (GTK_WINDOW (toplevel));
grab = gtk_window_group_get_current_grab (group);
if (GTK_MENU_SHELL (widget)->priv->active && !GTK_IS_MENU_SHELL (grab))
if (GTK_MENU_SHELL (widget)->priv->active && !GTK_IS_MENU_SHELL (grab) &&
!gtk_widget_is_ancestor (grab, widget))
gtk_menu_shell_cancel (GTK_MENU_SHELL (widget));
menu->priv->drag_scroll_started = FALSE;