From 0ae11e0e6c6a9985c466e874fccf8dc773238b67 Mon Sep 17 00:00:00 2001 From: Philippe Brochard Date: Sat, 12 Mar 2011 23:14:52 +0100 Subject: [PATCH] clfswm.asd: Change compilation order to prevent undefined variables. src/clfswm-internal.lisp (show-child(frame)): Handle properly the show-root-frame-p parameter. src/clfswm-util.lisp (move-frame, resize-frame): Do not move or resize a frame when it's the current root. --- ChangeLog | 13 +++++++++++++ clfswm.asd | 17 +++++++++-------- src/clfswm-internal.lisp | 5 +++-- src/clfswm-util.lisp | 9 +++------ src/package.lisp | 6 ++++-- 5 files changed, 32 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 94375b2..1b4b3a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2011-03-12 Philippe Brochard + + * clfswm.asd: Change compilation order to prevent undefined + variables. + + * src/clfswm-internal.lisp (show-child(frame)): Handle properly + the show-root-frame-p parameter. + +2011-03-11 Philippe Brochard + + * src/clfswm-util.lisp (move-frame, resize-frame): Do not move or + resize a frame when it's the current root. + 2011-03-10 Philippe Brochard * src/clfswm-internal.lisp (show-all-children): Handle properly diff --git a/clfswm.asd b/clfswm.asd index 3d3d964..cf2f114 100644 --- a/clfswm.asd +++ b/clfswm.asd @@ -13,6 +13,8 @@ :components ((:module src :components ((:file "tools") + (:file "version" + :depends-on ("tools")) (:file "my-html" :depends-on ("tools")) (:file "package" @@ -41,8 +43,6 @@ (:file "clfswm" :depends-on ("xlib-util" "netwm-util" "clfswm-keys" "config" "clfswm-internal" "clfswm-circulate-mode" "tools")) - (:file "version" - :depends-on ("tools")) (:file "clfswm-second-mode" :depends-on ("package" "clfswm" "clfswm-internal" "clfswm-generic-mode" "clfswm-placement")) @@ -60,18 +60,19 @@ :depends-on ("package" "config" "xlib-util" "clfswm-keys" "clfswm-generic-mode" "clfswm-placement")) (:file "clfswm-util" - :depends-on ("clfswm" "keysyms" "clfswm-info" "clfswm-second-mode" "clfswm-query" "clfswm-menu" "clfswm-autodoc" "clfswm-corner")) + :depends-on ("clfswm" "keysyms" "clfswm-info" "clfswm-second-mode" "clfswm-query" + "clfswm-menu" "clfswm-autodoc" "clfswm-corner")) + (:file "clfswm-configuration" + :depends-on ("package" "config" "clfswm-internal" "clfswm-util" "clfswm-query" + "clfswm-menu")) + (:file "menu-def" + :depends-on ("clfswm-menu" "clfswm-configuration" "clfswm" "clfswm-util" "clfswm-info")) (:file "clfswm-layout" :depends-on ("package" "clfswm-internal" "clfswm-util" "clfswm-info" "menu-def")) (:file "clfswm-pack" :depends-on ("clfswm" "clfswm-util" "clfswm-second-mode")) (:file "clfswm-nw-hooks" :depends-on ("package" "clfswm-util" "clfswm-info" "clfswm-layout" "menu-def")) - (:file "clfswm-configuration" - :depends-on ("package" "config" "clfswm-internal" "clfswm-util" "clfswm-query" - "clfswm-menu")) - (:file "menu-def" - :depends-on ("clfswm-menu" "clfswm-configuration" "clfswm" "clfswm-util" "clfswm-info")) (:file "bindings" :depends-on ("clfswm" "clfswm-internal" "clfswm-util" "clfswm-menu")) (:file "bindings-second-mode" diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index 264d7cd..54d6a39 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -627,8 +627,9 @@ (defmethod show-child ((frame frame) parent previous) (declare (ignore parent)) (with-slots (window show-window-p) frame - (if show-window-p - (when (or *show-root-frame-p* (not (child-equal-p frame *current-root*))) + (if (and show-window-p + (or *show-root-frame-p* (not (child-equal-p frame *current-root*)))) + (progn (map-window window) (set-child-stack-order window previous) (display-frame-info frame)) diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp index ab2770c..941cfb4 100644 --- a/src/clfswm-util.lisp +++ b/src/clfswm-util.lisp @@ -532,11 +532,8 @@ - - - (defun move-frame (frame parent orig-x orig-y) - (when (and frame parent) + (when (and frame parent (not (child-equal-p frame *current-root*))) (hide-all-children frame) (with-slots (window) frame (move-window window orig-x orig-y #'display-frame-info (list frame)) @@ -546,7 +543,7 @@ (defun resize-frame (frame parent orig-x orig-y) - (when (and frame parent) + (when (and frame parent (not (child-equal-p frame *current-root*))) (hide-all-children frame) (with-slots (window) frame (resize-window window orig-x orig-y #'display-frame-info (list frame)) @@ -580,7 +577,7 @@ mouse-fun is #'move-frame or #'resize-frame" (unless (equal (type-of child) 'frame) (setf child (find-frame-window child *current-root*))) (setf parent (find-parent-frame child))))) - (when (equal (type-of child) 'frame) + (when (and (frame-p child) (not (child-equal-p child *current-root*))) (funcall mouse-fn child parent root-x root-y)) (when (and child parent (focus-all-children child parent diff --git a/src/package.lisp b/src/package.lisp index 1c3dfbd..787eea8 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -46,6 +46,10 @@ This variable may be useful to speed up some slow version of CLX. It is particulary useful with CLISP/MIT-CLX.") +(defconfig *show-root-frame-p* nil nil + "Show the root frame information or not") + + (defconfig *border-size* 1 nil "Windows and frames border size") @@ -157,8 +161,6 @@ It is particulary useful with CLISP/MIT-CLX.") (defparameter *current-child* nil "The current child with the focus") -(defparameter *show-root-frame-p* nil) - (defparameter *main-keys* nil) (defparameter *main-mouse* nil) -- 2.11.4.GIT