From c05ad8b1866172df4270ad53b93c5d56c02417c6 Mon Sep 17 00:00:00 2001 From: Philippe Brochard Date: Sat, 28 May 2011 23:35:23 +0200 Subject: [PATCH] src/clfswm-internal.lisp (get-parent-layout): Handle correctly unmanaged windows. --- ChangeLog | 3 +++ src/clfswm-internal.lisp | 25 +++++++++---------------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index d3e1144..8282988 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2011-05-28 Philippe Brochard + * src/clfswm-internal.lisp (get-parent-layout): Handle correctly + unmanaged windows. + * src/clfswm-util.lisp (delete-focus-window-generic): Do not hide child before removing, so prevent a flickering. diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index 6207421..acc7de3 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -646,11 +646,13 @@ (defun get-parent-layout (child parent) - (if (frame-p parent) - (aif (frame-layout parent) - (funcall it child parent) - (no-layout child parent)) - (get-fullscreen-size))) + (if (or (frame-p child) (managed-window-p child parent)) + (if (frame-p parent) + (aif (frame-layout parent) + (funcall it child parent) + (no-layout child parent)) + (get-fullscreen-size)) + (values -1 -1 -1 -1))) @@ -669,20 +671,13 @@ (setf (xlib:drawable-x window) nx (xlib:drawable-y window) ny (xlib:drawable-width window) nw - (xlib:drawable-height window) nh) - ;;(xlib:display-finish-output *display*)) - ) + (xlib:drawable-height window) nh)) change)))) (defmethod adapt-child-to-parent ((frame frame) parent) (declare (ignore parent)) -;; (multiple-value-bind (nx ny nw nh) -;; (get-parent-layout frame parent) (with-slots (rx ry rw rh window) frame -;; (setf rx nx ry ny -;; rw (max nw 1) -;; rh (max nh 1)) (let ((change (or (/= (xlib:drawable-x window) rx) (/= (xlib:drawable-y window) ry) (/= (xlib:drawable-width window) rw) @@ -691,9 +686,7 @@ (setf (xlib:drawable-x window) rx (xlib:drawable-y window) ry (xlib:drawable-width window) rw - (xlib:drawable-height window) rh) - ;;(xlib:display-finish-output *display*)) - ) + (xlib:drawable-height window) rh)) change))) (defmethod adapt-child-to-parent (child parent) -- 2.11.4.GIT