From cdadcb842a0a5aa26a818bc756df2a9429c910f4 Mon Sep 17 00:00:00 2001 From: Philippe Brochard Date: Wed, 24 Apr 2013 22:41:44 +0200 Subject: [PATCH] Add a configuration variable (steal-focus) to allow or not to steal the focus on configure request --- src/clfswm.lisp | 7 ++++--- src/config.lisp | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/clfswm.lisp b/src/clfswm.lisp index 75d8997..42386c2 100644 --- a/src/clfswm.lisp +++ b/src/clfswm.lisp @@ -79,9 +79,10 @@ (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. diff --git a/src/config.lisp b/src/config.lisp index 6d0932d..19e3058 100644 --- a/src/config.lisp +++ b/src/config.lisp @@ -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.") -- 2.11.4.GIT