[clfswm-cvs] r121 - in clfswm: . src
pbrochard at common-lisp.net
pbrochard at common-lisp.net
Wed May 7 20:57:46 UTC 2008
Author: pbrochard
Date: Wed May 7 16:57:45 2008
New Revision: 121
Modified:
clfswm/ChangeLog
clfswm/src/clfswm-internal.lisp
clfswm/src/clfswm-util.lisp
Log:
Take care of unmanaged (hidden) windows.
Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog (original)
+++ clfswm/ChangeLog Wed May 7 16:57:45 2008
@@ -1,7 +1,11 @@
2008-05-07 Philippe Brochard <pbrochard at common-lisp.net>
+ * src/clfswm-util.lisp (find-child-under-mouse): Take care of
+ unmanaged (hidden) windows.
+
* src/clfswm-internal.lisp (place-window-from-hints): Give a
minimal size for windows.
+ (with-all-windows-frames-and-parent): New function.
* src/config.lisp (*default-window-width/height*): New parameters.
Modified: clfswm/src/clfswm-internal.lisp
==============================================================================
--- clfswm/src/clfswm-internal.lisp (original)
+++ clfswm/src/clfswm-internal.lisp Wed May 7 16:57:45 2008
@@ -204,6 +204,17 @@
(,rec ,sub-child))))))
(,rec ,root))))
+(defmacro with-all-windows-frames-and-parent ((root child parent) body-window body-frame)
+ (let ((rec (gensym))
+ (sub-child (gensym)))
+ `(labels ((,rec (,child ,parent)
+ (typecase ,child
+ (xlib:window ,body-window)
+ (frame ,body-frame
+ (dolist (,sub-child (reverse (frame-child ,child)))
+ (,rec ,sub-child ,child))))))
+ (,rec ,root nil))))
+
(defun frame-find-free-number ()
Modified: clfswm/src/clfswm-util.lisp
==============================================================================
--- clfswm/src/clfswm-util.lisp (original)
+++ clfswm/src/clfswm-util.lisp Wed May 7 16:57:45 2008
@@ -122,8 +122,9 @@
"Return the child window under the mouse"
(with-xlib-protect
(let ((win *root*))
- (with-all-windows-frames (*current-root* child)
- (when (and (<= (xlib:drawable-x child) x (+ (xlib:drawable-x child) (xlib:drawable-width child)))
+ (with-all-windows-frames-and-parent (*current-root* child parent)
+ (when (and (or (managed-window-p child parent) (equal parent *current-child*))
+ (<= (xlib:drawable-x child) x (+ (xlib:drawable-x child) (xlib:drawable-width child)))
(<= (xlib:drawable-y child) y (+ (xlib:drawable-y child) (xlib:drawable-height child))))
(setf win child))
(when (and (<= (frame-rx child) x (+ (frame-rx child) (frame-rw child)))
@@ -136,8 +137,9 @@
"Return the child under the mouse"
(with-xlib-protect
(let ((ret nil))
- (with-all-windows-frames (*current-root* child)
- (when (and (<= (xlib:drawable-x child) x (+ (xlib:drawable-x child) (xlib:drawable-width child)))
+ (with-all-windows-frames-and-parent (*current-root* child parent)
+ (when (and (or (managed-window-p child parent) (equal parent *current-child*))
+ (<= (xlib:drawable-x child) x (+ (xlib:drawable-x child) (xlib:drawable-width child)))
(<= (xlib:drawable-y child) y (+ (xlib:drawable-y child) (xlib:drawable-height child))))
(setf ret child))
(when (and (<= (frame-rx child) x (+ (frame-rx child) (frame-rw child)))
More information about the clfswm-cvs
mailing list