Skip to content
Browse files

Ensure alt-F1 can show the menu even if no menu applet on panel

Fix regression introduced by 17ac8aa and ensure that menu shown follows same theme as menu shown from panel menu button or panel menu bar
  • Loading branch information...
lukefromdc committed Oct 29, 2018
1 parent d68268a commit 105f685f3c11a6096f6396f9282ce8eb8ecf7920
Showing with 16 additions and 4 deletions.
  1. +16 −4 mate-panel/panel-action-protocol.c
@@ -50,11 +50,14 @@ static Atom atom_mate_panel_action_kill_dialog = None;

static void
panel_action_protocol_main_menu (GdkScreen *screen,
guint32 activate_time)
guint32 activate_time, GdkEvent *event)
PanelWidget *panel_widget;
GtkWidget *menu;
AppletInfo *info;
GdkVisual *visual;
GtkWidget *toplevel;
GtkStyleContext *context;

info = mate_panel_applet_get_by_type (PANEL_OBJECT_MENU_BAR, screen);
if (info) {
@@ -76,7 +79,16 @@ panel_action_protocol_main_menu (GdkScreen *screen,
panel_toplevel_push_autohide_disabler (panel_widget->toplevel);

gtk_menu_set_screen (GTK_MENU (menu), screen);
gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL);
/* Set up theme and transparency support */
toplevel = gtk_widget_get_toplevel (menu);
/* Fix any failures of compiz/other wm's to communicate with gtk for transparency */
visual = gdk_screen_get_rgba_visual(screen);
gtk_widget_set_visual(GTK_WIDGET(toplevel), visual);
/* Set menu and it's toplevel window to follow panel theme */
context = gtk_widget_get_style_context (GTK_WIDGET(toplevel));
gtk_menu_popup_at_pointer (GTK_MENU (menu),event);

static void
@@ -120,11 +132,11 @@ panel_action_protocol_filter (GdkXEvent *gdk_xevent,

if (xevent-> [0] == atom_mate_panel_action_main_menu)
panel_action_protocol_main_menu (screen, xevent-> [1]);
panel_action_protocol_main_menu (screen, xevent-> [1], event);
else if (xevent-> [0] == atom_mate_panel_action_run_dialog)
panel_action_protocol_run_dialog (screen, xevent-> [1]);
else if (xevent-> [0] == atom_gnome_panel_action_main_menu)
panel_action_protocol_main_menu (screen, xevent-> [1]);
panel_action_protocol_main_menu (screen, xevent-> [1], event);
else if (xevent-> [0] == atom_gnome_panel_action_run_dialog)
panel_action_protocol_run_dialog (screen, xevent-> [1]);
else if (xevent-> [0] == atom_mate_panel_action_kill_dialog)

0 comments on commit 105f685

Please sign in to comment.
You can’t perform that action at this time.