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, 8 Mar 2008 16:24:52 +0000 (17:24 +0100)
openbox/client.c

index cf33ac12c6c6ac8502ecf68ba155e162723baf37..177b5ce60e44cd49bcf0b229954e896c87733336 100644 (file)
@@ -3722,6 +3722,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);