[clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-55-g2ee0a21

Philippe Brochard pbrochard at common-lisp.net
Fri Dec 13 22:28:50 UTC 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CLFSWM - A(nother) Common Lisp FullScreen Window Manager".

The branch, master has been updated
       via  2ee0a21f395a006b88f476c4ff5202b329bfd8fb (commit)
      from  35913a8b7f8f95c1b912e02c56fa16191eae2d5a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2ee0a21f395a006b88f476c4ff5202b329bfd8fb
Author: Renaud Casenave-Pere <renaud at casenave-pere.fr>
Date:   Fri Dec 13 23:28:33 2013 +0100

    Do not steal the focus on focus-in

diff --git a/src/clfswm.lisp b/src/clfswm.lisp
index 3b6545a..0853644 100644
--- a/src/clfswm.lisp
+++ b/src/clfswm.lisp
@@ -130,6 +130,14 @@
     (manage-focus window root-x root-y)))
 
 
+(define-handler main-mode :focus-in (window)
+  (unless (child-equal-p window (focused-window))
+    (set-focus-to-current-child)))
+
+
+
+
+
 (define-handler main-mode :exposure (window)
   (awhen (find-frame-window window)
     (display-frame-info it)))
diff --git a/src/xlib-util.lisp b/src/xlib-util.lisp
index dbe4c2a..8dae671 100644
--- a/src/xlib-util.lisp
+++ b/src/xlib-util.lisp
@@ -570,15 +570,23 @@ they should be windows. So use this function to make a window out of them."
     (setf (xlib:window-priority window) :above)))
 
 
-(defun no-focus ()
-  "don't focus any window but still read keyboard events."
-  (xlib:set-input-focus *display* *no-focus-window* :pointer-root))
+(let ((focused-window nil))
+  (defun no-focus ()
+    "don't focus any window but still read keyboard events."
+    (xlib:set-input-focus *display* *no-focus-window* :pointer-root)
+    (setf focused-window nil))
+
+  (defun focus-window (window)
+    "Give the window focus."
+    (no-focus)
+    (when (xlib:window-p window)
+      (xlib:set-input-focus *display* window :parent)
+      (setf focused-window window)))
+
+  (defun focused-window ()
+    focused-window))
+
 
-(defun focus-window (window)
-  "Give the window focus."
-  (no-focus)
-  (when (xlib:window-p window)
-    (xlib:set-input-focus *display* window :parent)))
 
 (defun raise-and-focus-window (window)
   "Raise and focus."

-----------------------------------------------------------------------

Summary of changes:
 src/clfswm.lisp    |    8 ++++++++
 src/xlib-util.lisp |   24 ++++++++++++++++--------
 2 files changed, 24 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
CLFSWM - A(nother) Common Lisp FullScreen Window Manager



More information about the clfswm-cvs mailing list