summaryrefslogtreecommitdiff
path: root/libmate-panel-applet/mate-panel-applet.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2019-05-06 02:04:12 -0400
committerraveit65 <[email protected]>2019-05-09 13:07:34 +0200
commita2cdef91974fbe83995791e98f19ed58ec04a43c (patch)
treea08d044c5aef13dfa0b6359e6f9e16bbf1fadafe /libmate-panel-applet/mate-panel-applet.c
parent46cb23ba1aaed0dbcaf1df6ffac62f81fd06e6b4 (diff)
downloadmate-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/mate-panel-applet.c')
-rw-r--r--libmate-panel-applet/mate-panel-applet.c12
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