[clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-118-g2a97c66

Philippe Brochard pbrochard at common-lisp.net
Sun Sep 30 19:02:36 UTC 2012


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  2a97c668efec1376f35453b3a560117b1ce7435b (commit)
      from  81a310cac49b418d7671c424713449e67cd870a3 (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 2a97c668efec1376f35453b3a560117b1ce7435b
Author: Philippe Brochard <pbrochard at common-lisp.net>
Date:   Sun Sep 30 21:02:30 2012 +0200

    src/clfswm.lisp (configure-request handler): Send a configuration notify event in a more precise way.

diff --git a/ChangeLog b/ChangeLog
index 18a40ce..27a9fd1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-30  Philippe Brochard  <pbrochard at common-lisp.net>
+
+	* src/clfswm.lisp (configure-request handler): Send a
+	configuration notify event in a more precise way.
+
 2012-09-29  Philippe Brochard  <pbrochard at common-lisp.net>
 
 	* src/xlib-util.lisp (with-xlib-protect): Limit X errors ignored
diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp
index 2bc4a60..41606c2 100644
--- a/src/clfswm-internal.lisp
+++ b/src/clfswm-internal.lisp
@@ -959,10 +959,13 @@ XINERAMA version 1.1 opcode: 150
     (multiple-value-bind (nx ny nw nh)
 	(get-parent-layout window parent)
       (setf nw (max nw 1)  nh (max nh 1))
-      (let ((change (or (/= (x-drawable-x window) nx)
-			(/= (x-drawable-y window) ny)
-			(/= (x-drawable-width window) nw)
-			(/= (x-drawable-height window) nh))))
+      (let ((change nil))
+        (when (or (/= (x-drawable-x window) nx)
+                  (/= (x-drawable-y window) ny))
+          (setf change :moved))
+        (when (or (/= (x-drawable-width window) nw)
+                  (/= (x-drawable-height window) nh))
+          (setf change :resized))
         (when change
           (setf (x-drawable-x window) nx
                 (x-drawable-y window) ny
@@ -974,10 +977,13 @@ XINERAMA version 1.1 opcode: 150
 (defmethod adapt-child-to-parent ((frame frame) parent)
   (declare (ignore parent))
     (with-slots (rx ry rw rh window) frame
-      (let ((change (or (/= (x-drawable-x window) rx)
-			(/= (x-drawable-y window) ry)
-			(/= (x-drawable-width window) rw)
-			(/= (x-drawable-height window) rh))))
+      (let ((change nil))
+        (when (or (/= (x-drawable-x window) rx)
+                  (/= (x-drawable-y window) ry))
+          (setf change :moved))
+        (when (or (/= (x-drawable-width window) rw)
+                  (/= (x-drawable-height window) rh))
+          (setf change :resized))
         (when change
           (setf (x-drawable-x window) rx
                 (x-drawable-y window) ry
diff --git a/src/clfswm.lisp b/src/clfswm.lisp
index 119dd4d..9f8faf1 100644
--- a/src/clfswm.lisp
+++ b/src/clfswm.lisp
@@ -44,9 +44,7 @@
 			      window root-x root-y *fun-press*)))
 
 (define-handler main-mode :configure-request (stack-mode window x y width height border-width value-mask)
-  (let ((old-width (x-drawable-height window))
-        (old-height (x-drawable-height window))
-        (old-border (x-drawable-border-width window)))
+  (let ((change nil))
     (labels ((has-x (mask) (= 1 (logand mask 1)))
              (has-y (mask) (= 2 (logand mask 2)))
              (has-w (mask) (= 4 (logand mask 4)))
@@ -54,19 +52,24 @@
              (has-bw (mask) (= 16 (logand mask 16)))
              (has-stackmode (mask) (= 64 (logand mask 64)))
              (adjust-from-request ()
-               (when (has-x value-mask) (setf (x-drawable-x window) x))
-               (when (has-y value-mask) (setf (x-drawable-y window) y))
-               (when (has-h value-mask) (setf (x-drawable-height window) height))
-               (when (has-w value-mask) (setf (x-drawable-width window) width))))
+               (when (has-x value-mask) (setf (x-drawable-x window) x
+                                              change :moved))
+               (when (has-y value-mask) (setf (x-drawable-y window) y
+                                              change :moved))
+               (when (has-h value-mask) (setf (x-drawable-height window) height
+                                              change :resized))
+               (when (has-w value-mask) (setf (x-drawable-width window) width
+                                              change :resized))))
       (when window
         (xlib:with-state (window)
           (when (has-bw value-mask)
-            (setf (x-drawable-border-width window) border-width))
+            (setf (x-drawable-border-width window) border-width
+                  change :resized))
           (let ((current-root (find-current-root)))
             (if (find-child window current-root)
                 (let ((parent (find-parent-frame window current-root)))
                   (if (and parent (managed-window-p window parent))
-                      (adapt-child-to-parent window parent)
+                      (setf change (adapt-child-to-parent window parent))
                       (adjust-from-request)))
                 (adjust-from-request)))
           (when (has-stackmode value-mask)
@@ -75,12 +78,11 @@
                (unless (null-size-window-p window)
                  (when (or (child-equal-p window (current-child))
                            (is-in-current-child-p window))
+                   (setf change :moved)
                    (raise-window window)
                    (focus-window window)
                    (focus-all-children window (find-parent-frame window (find-current-root)))))))))
-        (unless (or (/= old-width (x-drawable-width window))
-                    (/= old-height (x-drawable-height window))
-                    (/= old-border (x-drawable-border-width window)))
+        (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.
           (send-configuration-notify window (x-drawable-x window) (x-drawable-y window)

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

Summary of changes:
 ChangeLog                |    5 +++++
 src/clfswm-internal.lisp |   22 ++++++++++++++--------
 src/clfswm.lisp          |   26 ++++++++++++++------------
 3 files changed, 33 insertions(+), 20 deletions(-)


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




More information about the clfswm-cvs mailing list