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>
Sat, 2 Feb 2008 19:37:53 +0000 (20:37 +0100)
openbox/client.c

index 3d752d2f7a32d1d9bb7f9b054c87f7b42654ba16..3e571e043d09ba517af47744cb9778c101e56d9b 100644 (file)
@@ -3611,6 +3611,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);