Do not update current size when there is only geometry change and not head structure...
authorPhilippe Brochard <pbrochard@common-lisp.net>
Wed, 14 Nov 2012 20:59:02 +0000 (14 21:59 +0100)
committerPhilippe Brochard <pbrochard@common-lisp.net>
Wed, 14 Nov 2012 20:59:02 +0000 (14 21:59 +0100)
src/clfswm-internal.lisp
src/clfswm.lisp

index 9588f8b..8653973 100644 (file)
@@ -855,7 +855,9 @@ XINERAMA version 1.1 opcode: 150
                          (setf (root-x root) x
                                (root-y root) y
                                (root-w root) w
-                               (root-h root) h))))
+                               (root-h root) h)))
+                 (setf last-sizes sizes)
+                 :update)
                (create-root-geometry ()
                  (reset-root-list)
                  ;; Add frames in *root-frame* until we get the same number as screen heads
@@ -882,12 +884,13 @@ XINERAMA version 1.1 opcode: 150
                          ;;(add-placed-frame-tmp frame 2)  ;; For tests
                          (unless (frame-child frame)
                            (add-frame (create-frame) frame))
-                         (define-as-root frame x y w h)))))
+                         (define-as-root frame x y w h)))
+                 (setf last-sizes sizes)
+                 nil))
         (format t "Screen sizes: ~A~%" sizes)
         (if (= (length sizes) (length last-sizes))
             (update-root-geometry)
-            (create-root-geometry))
-        (setf last-sizes sizes)))))
+            (create-root-geometry))))))
 
 
 
index 3a31519..25ed555 100644 (file)
 (define-handler main-mode :configure-notify (window)
   (when (child-equal-p window *root*)
     (unless (null-size-window-in-frame *root-frame*)
-      (place-frames-from-xinerama-infos)
-      (finish-configuring-root)
+      (unless (eql (place-frames-from-xinerama-infos) :update)
+        (finish-configuring-root))
       (show-all-children)
       (call-hook *root-size-change-hook*))))