Commit 1199ef89 authored by Gaël Bonithon's avatar Gaël Bonithon
Browse files

windowmenu: Block autohide when the plugin menu is shown

MR: !75
parent eb933622
Pipeline #15132 passed with stages
in 3 minutes and 5 seconds
......@@ -1083,14 +1083,16 @@ G_GNUC_END_IGNORE_DEPRECATIONS
static void
window_menu_plugin_menu_selection_done (GtkWidget *menu,
GtkWidget *button)
window_menu_plugin_menu_selection_done (GtkWidget *menu,
WindowMenuPlugin *plugin)
panel_return_if_fail (button == NULL || GTK_IS_TOGGLE_BUTTON (button));
panel_return_if_fail (plugin->button == NULL || GTK_IS_TOGGLE_BUTTON (plugin->button));
panel_return_if_fail (GTK_IS_MENU (menu));
if (button != NULL)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), FALSE);
xfce_panel_plugin_block_autohide (XFCE_PANEL_PLUGIN (plugin), FALSE);
if (plugin->button != NULL)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (plugin->button), FALSE);
/* delay destruction so we can handle the activate event first */
panel_utils_destroy_later (GTK_WIDGET (menu));
......@@ -1400,8 +1402,9 @@ window_menu_plugin_menu (GtkWidget *button,
/* popup the menu */
menu = window_menu_plugin_menu_new (plugin);
g_signal_connect (G_OBJECT (menu), "deactivate",
G_CALLBACK (window_menu_plugin_menu_selection_done), button);
G_CALLBACK (window_menu_plugin_menu_selection_done), plugin);
xfce_panel_plugin_block_autohide (XFCE_PANEL_PLUGIN (plugin), TRUE);
gtk_menu_popup_at_widget (GTK_MENU (menu), button,
xfce_panel_plugin_get_orientation (XFCE_PANEL_PLUGIN (plugin)) == GTK_ORIENTATION_VERTICAL
Supports Markdown
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