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@gmail.com>
Sun, 19 Sep 2010 15:55:22 +0000 (17:55 +0200)
openbox/client.c

index 4bbac35e5ca8dd09d0ed8ce58157bed705456027..421ad5b0fecb001be9864b769e1d83182925a46c 100644 (file)
@@ -3878,6 +3878,13 @@ gboolean client_focus(ObClient *self)
 {
     if (!client_validate(self)) return FALSE;
 
+    {
+        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);