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

Philippe Brochard pbrochard at common-lisp.net
Sat Feb 16 22:23:19 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  e1c7bb92ff3bf56c83544b36f4e424040563f63c (commit)
      from  15f619e265ec99fa153c82ee40cff2ecc428501b (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 e1c7bb92ff3bf56c83544b36f4e424040563f63c
Author: Philippe Brochard <pbrochard at common-lisp.net>
Date:   Sat Feb 16 23:23:12 2013 +0100

    Ensure window type for leader

diff --git a/src/clfswm-circulate-mode.lisp b/src/clfswm-circulate-mode.lisp
index bc8ea8b..fd8ca93 100644
--- a/src/clfswm-circulate-mode.lisp
+++ b/src/clfswm-circulate-mode.lisp
@@ -177,10 +177,10 @@
     (xlib:destroy-window *circulate-window*))
   (when *circulate-font*
     (xlib:close-font *circulate-font*))
-  (xlib:display-finish-output *display*)
   (setf *circulate-window* nil
 	*circulate-gc* nil
-	*circulate-font* nil))
+	*circulate-font* nil)
+  (xlib:display-finish-output *display*))
 
 (defun circulate-loop-function ()
   (unless (is-a-key-pressed-p)
diff --git a/src/clfswm.lisp b/src/clfswm.lisp
index 730d5d8..62cdf76 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))))))))
+                 (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/xlib-util.lisp b/src/xlib-util.lisp
index 3fef7cf..8748db3 100644
--- a/src/xlib-util.lisp
+++ b/src/xlib-util.lisp
@@ -378,7 +378,7 @@ they should be windows. So use this function to make a window out of them."
   (first (xlib:get-property window :WM_TRANSIENT_FOR)))
 
 (defun window-leader (window)
-  (when window
+  (when (xlib:window-p window)
     (or (first (xlib:get-property window :WM_CLIENT_LEADER))
         (let ((id (window-transient-for window)))
           (when id
@@ -505,22 +505,23 @@ they should be windows. So use this function to make a window out of them."
 (defun window-type (window)
   "Return one of :desktop, :dock, :toolbar, :utility, :splash,
 :dialog, :transient, :maxsize and :normal."
-  (or (and (let ((hints (xlib:wm-normal-hints window)))
-             (and hints (or (and (xlib:wm-size-hints-max-width hints)
-                                 (< (xlib:wm-size-hints-max-width hints) (x-drawable-width *root*)))
-                            (and (xlib:wm-size-hints-max-height hints)
-                                 (< (xlib:wm-size-hints-max-height hints) (x-drawable-height *root*)))
-                            (xlib:wm-size-hints-min-aspect hints)
-                            (xlib:wm-size-hints-max-aspect hints))))
-           :maxsize)
-      (let ((net-wm-window-type (xlib:get-property window :_NET_WM_WINDOW_TYPE)))
-        (when net-wm-window-type
-          (dolist (type-atom net-wm-window-type)
-            (when (assoc (xlib:atom-name *display* type-atom) +netwm-window-types+)
-              (return (cdr (assoc (xlib:atom-name *display* type-atom) +netwm-window-types+)))))))
-      (and (xlib:get-property window :WM_TRANSIENT_FOR)
-           :transient)
-      :normal))
+  (when (xlib:window-p window)
+    (or (and (let ((hints (xlib:wm-normal-hints window)))
+               (and hints (or (and (xlib:wm-size-hints-max-width hints)
+                                   (< (xlib:wm-size-hints-max-width hints) (x-drawable-width *root*)))
+                              (and (xlib:wm-size-hints-max-height hints)
+                                   (< (xlib:wm-size-hints-max-height hints) (x-drawable-height *root*)))
+                              (xlib:wm-size-hints-min-aspect hints)
+                              (xlib:wm-size-hints-max-aspect hints))))
+             :maxsize)
+        (let ((net-wm-window-type (xlib:get-property window :_NET_WM_WINDOW_TYPE)))
+          (when net-wm-window-type
+            (dolist (type-atom net-wm-window-type)
+              (when (assoc (xlib:atom-name *display* type-atom) +netwm-window-types+)
+                (return (cdr (assoc (xlib:atom-name *display* type-atom) +netwm-window-types+)))))))
+        (and (xlib:get-property window :WM_TRANSIENT_FOR)
+             :transient)
+        :normal)))
 
 
 

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

Summary of changes:
 src/clfswm-circulate-mode.lisp |    4 ++--
 src/clfswm.lisp                |    4 ++--
 src/xlib-util.lisp             |   35 ++++++++++++++++++-----------------
 3 files changed, 22 insertions(+), 21 deletions(-)


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




More information about the clfswm-cvs mailing list