Listen to key press events on the support window
authorMikael Magnusson <mikachu@gmail.com>
Sun, 5 Jul 2009 15:07:18 +0000 (17:07 +0200)
committerMikael Magnusson <mikachu@gmail.com>
Sun, 5 Jul 2009 15:07:19 +0000 (17:07 +0200)
This allows us to make binds that are only active when no clients are
focused with the grab=no option. However, this will mean that these
binds will also be launched if the keyboard is otherwise grabbed, for
example during alt-tab or when showing a menu.

openbox/screen.c

index 7eda7c3..bb26a24 100644 (file)
@@ -163,7 +163,7 @@ gboolean screen_annex(void)
 
     /* create the netwm support window */
     attrib.override_redirect = TRUE;
-    attrib.event_mask = PropertyChangeMask;
+    attrib.event_mask = PropertyChangeMask | KeyPressMask | KeyReleaseMask;
     screen_support_win = XCreateWindow(obt_display, obt_root(ob_screen),
                                        -100, -100, 1, 1, 0,
                                        CopyFromParent, InputOutput,