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

Philippe Brochard pbrochard at common-lisp.net
Fri Jan 18 22:36:38 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  15f619e265ec99fa153c82ee40cff2ecc428501b (commit)
      from  42282897b00a750058ea2c2b8f9aad1303e23f25 (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 15f619e265ec99fa153c82ee40cff2ecc428501b
Author: Philippe Brochard <pbrochard at common-lisp.net>
Date:   Fri Jan 18 23:36:32 2013 +0100

    Only windows with no transient windows participate in hidden children optimization

diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp
index 1d650c5..61fd5dc 100644
--- a/src/clfswm-internal.lisp
+++ b/src/clfswm-internal.lisp
@@ -1204,8 +1204,22 @@ XINERAMA version 1.1 opcode: 150
     "Show all children and hide those not in a root frame"
     (declare (ignore from-root-frame))
     (let ((geometry-change nil)
-          (hidden-child nil))
-      (labels ((in-displayed-list (child)
+          (hidden-child nil)
+          (has-no-leader-list nil))
+      (labels ((set-has-no-leader-list ()
+                 (let ((window-list nil)
+                       (leader-list nil))
+                   (with-all-windows (*root-frame* win)
+                     (let ((leader (window-leader win)))
+                       (when leader
+                         (when (member leader window-list :test (lambda (x y) (eql x (first y))))
+                           (pushnew leader leader-list))
+                         (push (list leader win) window-list))))
+                   (dolist (leader-win window-list)
+                     (unless (member leader-win leader-list :test (lambda (x y) (eql (first x) y)))
+                       (push (second leader-win) has-no-leader-list)))))
+
+               (in-displayed-list (child)
                  (member child displayed-child :test (lambda (c rect)
                                                        (child-equal-p c (child-rect-child rect)))))
 
@@ -1240,7 +1254,8 @@ XINERAMA version 1.1 opcode: 150
                    (let ((rect (make-child-rect :child child :parent parent
                                                 :selected-p selected-p
                                                 :x nx :y ny :w nw :h nh)))
-                     (if (and *show-hide-policy* (hidden-child-p rect))
+                     (if (and *show-hide-policy* (hidden-child-p rect)
+                              (member child has-no-leader-list :test #'child-equal-p))
                          (add-in-hidden-list child)
                          (push rect displayed-child)))))
 
@@ -1267,6 +1282,7 @@ XINERAMA version 1.1 opcode: 150
                      (select-and-display child parent selected-p)))))
 
         (setf displayed-child nil)
+        (set-has-no-leader-list)
         (rec *root-frame* nil t (child-root-p *root-frame*))
         (display-displayed-child)
         (dolist (child hidden-child)
diff --git a/src/clfswm.lisp b/src/clfswm.lisp
index 62cdf76..730d5d8 100644
--- a/src/clfswm.lisp
+++ b/src/clfswm.lisp
@@ -79,9 +79,9 @@
                (when (or (child-equal-p window (current-child))
                          (is-in-current-child-p window))
                  (setf change (or change :moved))
+                 (show-all-children)
                  (focus-window window)
-                 (focus-all-children window (find-parent-frame window (find-current-root)))
-                 (show-all-children))))))
+                 (focus-all-children window (find-parent-frame window (find-current-root))))))))
         (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/xlib-util.lisp b/src/xlib-util.lisp
index 6210c6e..3fef7cf 100644
--- a/src/xlib-util.lisp
+++ b/src/xlib-util.lisp
@@ -374,6 +374,16 @@ they should be windows. So use this function to make a window out of them."
   (eql (window-state window) +iconic-state+))
 
 
+(defun window-transient-for (window)
+  (first (xlib:get-property window :WM_TRANSIENT_FOR)))
+
+(defun window-leader (window)
+  (when window
+    (or (first (xlib:get-property window :WM_CLIENT_LEADER))
+        (let ((id (window-transient-for window)))
+          (when id
+            (window-leader id))))))
+
 
 
 (defun unhide-window (window)

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

Summary of changes:
 src/clfswm-internal.lisp |   22 +++++++++++++++++++---
 src/clfswm.lisp          |    4 ++--
 src/xlib-util.lisp       |   10 ++++++++++
 3 files changed, 31 insertions(+), 5 deletions(-)


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




More information about the clfswm-cvs mailing list