[clfswm-cvs] r149 - in clfswm: . src

pbrochard at common-lisp.net pbrochard at common-lisp.net
Sat Jun 21 21:37:18 UTC 2008


Author: pbrochard
Date: Sat Jun 21 17:37:15 2008
New Revision: 149

Modified:
   clfswm/ChangeLog
   clfswm/TODO
   clfswm/src/clfswm-internal.lisp
   clfswm/src/clfswm-util.lisp
   clfswm/src/config.lisp
Log:
(show-all-children): Compute geometry and selection first and then show only necessary children. (show-child): remove unneeded display-p parameter. (get-fullscreen-size): Place the frame border outside the screen (this prevent the loose of 2 pixels per directions :)

Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog	(original)
+++ clfswm/ChangeLog	Sat Jun 21 17:37:15 2008
@@ -1,3 +1,13 @@
+2008-06-21  Philippe Brochard  <pbrochard at common-lisp.net>
+
+	* src/clfswm-internal.lisp (show-all-children): Compute geometry
+	and selection first and then show only necessary children.
+	(show-child): remove unneeded display-p parameter.
+
+	* src/config.lisp (get-fullscreen-size): Place the frame border
+	outside the screen (this prevent the loose of 2 pixels per
+	directions :)
+
 2008-06-12  Philippe Brochard  <pbrochard at common-lisp.net>
 
 	* src/clfswm-internal.lisp (focus-child): Algorithm change to

Modified: clfswm/TODO
==============================================================================
--- clfswm/TODO	(original)
+++ clfswm/TODO	Sat Jun 21 17:37:15 2008
@@ -7,11 +7,13 @@
 ===============
 Should handle these soon.
 
+- Raise Order when tile space layout
+
 - Use conpressed motion events for clisp. [Philippe]
 
 - Show config -> list and display documentation for all tweakable global variables. [Philippe]
 
-- A Gimp layout example [Philippe]
+- A Gimp layout example (a main window and all others on the left) [Philippe]
 
 - Hook to open next window in named/numbered frame [Philippe]
 

Modified: clfswm/src/clfswm-internal.lisp
==============================================================================
--- clfswm/src/clfswm-internal.lisp	(original)
+++ clfswm/src/clfswm-internal.lisp	Sat Jun 21 17:37:15 2008
@@ -459,33 +459,32 @@
 
 
 
-(defgeneric show-child (child parent display-p raise-p))
+(defgeneric show-child (child parent raise-p))
 
-(defmethod show-child ((frame frame) parent display-p raise-p)
+(defmethod show-child ((frame frame) parent raise-p)
   (declare (ignore parent))
   (with-xlib-protect
     (with-slots (window show-window-p) frame
       (if show-window-p
-	  (when display-p
-	    (when (or *show-root-frame-p* (not (equal frame *current-root*)))
-	      (setf (xlib:window-background window) (get-color "Black"))
-	      (xlib:map-window window)
-	      (when raise-p (raise-window window))))
+	  (when (or *show-root-frame-p* (not (equal frame *current-root*)))
+	    (setf (xlib:window-background window) (get-color "Black"))
+	    (xlib:map-window window)
+	    (when raise-p (raise-window window)))
 	  (hide-window window)))
     (display-frame-info frame)))
 
 
-(defmethod show-child ((window xlib:window) parent display-p raise-p)
+(defmethod show-child ((window xlib:window) parent raise-p)
   (with-xlib-protect
     (if (or (managed-window-p window parent)
 	    (equal parent *current-child*))
-	(when display-p
+	(progn
 	  (xlib:map-window window)
 	  (when raise-p (raise-window window)))
 	(hide-window window))))
 
-(defmethod show-child (child parent display-p raise-p)
-  (declare (ignore child parent display-p raise-p))
+(defmethod show-child (child parent raise-p)
+  (declare (ignore child parent raise-p))
   ())
 
 
@@ -592,22 +591,25 @@
   "Show all children from *current-root*. Start the effective display
 only for display-child and its children"
   (let ((geometry-change nil))
-    (labels ((rec (root parent selected-p selected-parent-p display-p raise-p)
+    (labels ((rec-geom (root parent selected-p selected-parent-p)
 	       (when (adapt-child-to-parent root parent)
 		 (setf geometry-change t))
-	       (show-child root parent display-p raise-p)
-	       (select-child root (if (equal root *current-child*) t
-				      (if (and selected-p selected-parent-p) :maybe nil)))
+	       (select-child root (cond ((equal root *current-child*) t)
+					((and selected-p selected-parent-p) :maybe)
+					(t nil)))
 	       (when (frame-p root)
-		 (let ((selected-child (frame-selected-child root))
-		       (reversed-children (reverse (frame-child root))))
+		 (let ((selected-child (frame-selected-child root)))
+		   (dolist (child (reverse (frame-child root)))
+		     (rec-geom child root (equal child selected-child) (and selected-p selected-parent-p))))))
+	     (rec (root parent raise-p)
+	       (show-child root parent raise-p)
+	       (when (frame-p root)
+		 (let ((reversed-children (reverse (frame-child root))))
 		   (loop for child in reversed-children
 		      for raise-p in (raise-p-list reversed-children)
-		      do (rec child root (equal child selected-child)
-			      (and selected-p selected-parent-p)
-			      (or display-p (equal root display-child))
-			      raise-p))))))
-      (rec *current-root* nil t t (equal display-child *current-root*) t)
+		      do (rec child root raise-p))))))
+      (rec-geom *current-root* nil t t)
+      (rec display-child nil t)
       (set-focus-to-current-child)
       geometry-change)))
 

Modified: clfswm/src/clfswm-util.lisp
==============================================================================
--- clfswm/src/clfswm-util.lisp	(original)
+++ clfswm/src/clfswm-util.lisp	Sat Jun 21 17:37:15 2008
@@ -512,7 +512,7 @@
   (when (and (frame-p *current-root*)
 	     (in-corner *present-all-windows-corner* root-x root-y))
     (stop-button-event)
-    (switch-to-root-frame)
+    (switch-to-root-frame :show-later t)
     (present-windows-generic (*root-frame*)
       (hide-all-children *root-frame*)
       (setf *current-root* parent))

Modified: clfswm/src/config.lisp
==============================================================================
--- clfswm/src/config.lisp	(original)
+++ clfswm/src/config.lisp	Sat Jun 21 17:37:15 2008
@@ -40,9 +40,10 @@
 
 ;;; CONFIG - Screen size
 (defun get-fullscreen-size ()
-  "Return the size of root child (values rx ry rw rh raise-p)
+  "Return the size of root child (values rx ry rw rh)
 You can tweak this to what you want"
-  (values -1 -1 (xlib:screen-width *screen*) (xlib:screen-height *screen*) nil))
+  (values -2 -2 (+ (xlib:screen-width *screen*) 2) (+ (xlib:screen-height *screen*) 2)))
+  ;;(values -1 -1 (xlib:screen-width *screen*) (xlib:screen-height *screen*)))
 ;; (values -1 -1 1024 768))
 ;;  (values 100 100 800 600))
 



More information about the clfswm-cvs mailing list