Commit 5f55c420 authored by Matthias Clasen's avatar Matthias Clasen

GtkMenuShell: always 'activate' menu shells

Failing to do so can leave us with a stuck grab in some cases.
https://bugzilla.gnome.org/show_bug.cgi?id=554057
parent f771a641
......@@ -686,7 +686,6 @@ window_key_press_handler (GtkWidget *widget,
GtkMenuShell *menu_shell = GTK_MENU_SHELL (menubars->data);
_gtk_menu_shell_set_keyboard_mode (menu_shell, TRUE);
_gtk_menu_shell_activate (menu_shell);
gtk_menu_shell_select_first (menu_shell, FALSE);
g_list_free (menubars);
......
......@@ -1190,7 +1190,6 @@ gtk_real_menu_shell_deactivate (GtkMenuShell *menu_shell)
if (priv->active)
{
priv->button = 0;
priv->active = FALSE;
priv->activate_time = 0;
......@@ -1313,6 +1312,8 @@ gtk_menu_shell_real_select_item (GtkMenuShell *menu_shell,
return;
}
_gtk_menu_shell_activate (menu_shell);
priv->active_menu_item = menu_item;
if (pack_dir == GTK_PACK_DIRECTION_TTB || pack_dir == GTK_PACK_DIRECTION_BTT)
_gtk_menu_item_set_placement (GTK_MENU_ITEM (priv->active_menu_item),
......
......@@ -58,7 +58,6 @@ struct _GtkMenuShellPrivate
void _gtk_menu_shell_select_last (GtkMenuShell *menu_shell,
gboolean search_sensitive);
void _gtk_menu_shell_activate (GtkMenuShell *menu_shell);
gint _gtk_menu_shell_get_popup_delay (GtkMenuShell *menu_shell);
void _gtk_menu_shell_set_grab_device (GtkMenuShell *menu_shell,
GdkDevice *device);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment