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>
Thu, 28 Feb 2008 03:35:28 +0000 (04:35 +0100)
openbox/client.c

index 9d0f12fe3de7c6bd6c7d538d2fd1c6181f1834f6..723a4a6196cbbe1d88f6ee474932f8f47c7a734e 100644 (file)
@@ -3719,6 +3719,13 @@ gboolean client_can_focus(ObClient *self)
 
 gboolean client_focus(ObClient *self)
 {
+    {
+        XkbStateRec state;
+        XkbGetState(obt_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);