diff options
author | lukefromdc <[email protected]> | 2019-05-06 02:04:12 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-05-09 13:11:35 +0200 |
commit | a6c3a1f9da5ad849b3c235ff55b1273e5c336b92 (patch) | |
tree | ac1ff79fcef7acb3819f2e4ab26a66c89e52eb1e | |
parent | 4638ec17997aac70beee148ca139474ca871ab95 (diff) | |
download | mate-panel-a6c3a1f9da5ad849b3c235ff55b1273e5c336b92.tar.bz2 mate-panel-a6c3a1f9da5ad849b3c235ff55b1273e5c336b92.tar.xz |
Fix panel applet keyboard focus trap
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
-rw-r--r-- | libmate-panel-applet/mate-panel-applet.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c index d7d510e4..e98fc08a 100644 --- a/libmate-panel-applet/mate-panel-applet.c +++ b/libmate-panel-applet/mate-panel-applet.c @@ -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 |