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>
Sat, 11 Oct 2014 00:17:20 +0000 (02:17 +0200)
openbox/client.c

index 24eba20..fa2f2a3 100644 (file)
@@ -4026,6 +4026,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);