diff options
author | lukefromdc <[email protected]> | 2019-05-06 02:04:12 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-05-09 13:07:34 +0200 |
commit | a2cdef91974fbe83995791e98f19ed58ec04a43c (patch) | |
tree | a08d044c5aef13dfa0b6359e6f9e16bbf1fadafe /libmate-panel-applet | |
parent | 46cb23ba1aaed0dbcaf1df6ffac62f81fd06e6b4 (diff) | |
download | mate-panel-a2cdef91974fbe83995791e98f19ed58ec04a43c.tar.bz2 mate-panel-a2cdef91974fbe83995791e98f19ed58ec04a43c.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
Diffstat (limited to 'libmate-panel-applet')
-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 |