Add a configuration variable (steal-focus) to allow or not to steal the focus on...
authorPhilippe Brochard <pbrochard@common-lisp.net>
Wed, 24 Apr 2013 20:41:44 +0000 (24 22:41 +0200)
committerPhilippe Brochard <pbrochard@common-lisp.net>
Wed, 24 Apr 2013 20:41:44 +0000 (24 22:41 +0200)
src/clfswm.lisp
src/config.lisp

index 75d8997..42386c2 100644 (file)
                (when (or (child-equal-p window (current-child))
                          (is-in-current-child-p window))
                  (setf change (or change :moved))
-                 (focus-window window)
-                 (when (focus-all-children window (find-parent-frame window (find-current-root)))
-                   (show-all-children)))))))
+                 (when *steal-focus*
+                   (focus-window window)
+                   (when (focus-all-children window (find-parent-frame window (find-current-root)))
+                     (show-all-children))))))))
         (unless (eq change :resized)
           ;; To be ICCCM compliant, send a fake configuration notify event only when
           ;; the window has moved and not when it has been resized or the border width has changed.
index 6d0932d..19e3058 100644 (file)
@@ -59,6 +59,8 @@ Example: :mod-2 for num_lock, :lock for Caps_lock...")
 A list of (list match-function handle-function)")
 
 
+(defconfig *steal-focus* t nil
+           "Allow to streal the focus on configure request")
 
 (defconfig *hide-unmanaged-window* t nil
            "Hide or not unmanaged windows when a child is deselected.")