Stop focus from moving if scroll lock is enabled. Useful when some program decides...
authorMikael Magnusson <mikachu@comhem.se>
Mon, 23 Jul 2007 23:38:03 +0000 (01:38 +0200)
committerMikael Magnusson <mikachu@comhem.se>
Sun, 5 Aug 2007 11:07:16 +0000 (13:07 +0200)
openbox/client.c

index 1a684ac66cf6b3c93d8f3d28027b1b43d501678c..8da586acbe67b8b439f88270a96f3eacd6d08593 100644 (file)
@@ -3509,6 +3509,13 @@ gboolean client_can_focus(ObClient *self)
 
 gboolean client_focus(ObClient *self)
 {
+    {
+        XkbStateRec state;
+        XkbGetState(ob_display, XkbUseCoreKbd, &state);
+        if (state.locked_mods & 128)
+            return FALSE;
+    }
+
     /* we might not focus this window, so if we have modal children which would
        be focused instead, bring them to this desktop */
     client_bring_modal_windows(self);