Skip to content

Commit

Permalink
Fix panel applet keyboard focus trap
Browse files Browse the repository at this point in the history
Do not open the context menu on tab-or on anything but the menu key. Note that Return must be used by some applets (e.g. the clock) for something else
  • Loading branch information
lukefromdc authored and raveit65 committed May 8, 2019
1 parent dd16152 commit c6133c6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions libmate-panel-applet/mate-panel-applet.c
Original file line number Diff line number Diff line change
Expand Up @@ -985,13 +985,19 @@ mate_panel_applet_button_release (GtkWidget *widget,
return mate_panel_applet_button_event (applet, event);
}

/*Open the applet context menu only on Menu key
*Do not open it on Return or some applets won't work
*/
static gboolean
mate_panel_applet_key_press_event (GtkWidget *widget,
GdkEventKey *event)
{
mate_panel_applet_menu_popup (MATE_PANEL_APPLET (widget), (GdkEvent *) event);

return TRUE;
if (event->keyval == GDK_KEY_Menu){
mate_panel_applet_menu_popup (MATE_PANEL_APPLET (widget), (GdkEvent *) event);
return TRUE;
}
else
return FALSE;
}

static void
Expand Down

0 comments on commit c6133c6

Please sign in to comment.