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

pbrochard at common-lisp.net pbrochard at common-lisp.net
Wed May 7 20:09:35 UTC 2008


Author: pbrochard
Date: Wed May  7 16:09:35 2008
New Revision: 119

Modified:
   clfswm/ChangeLog
   clfswm/clfswm.asd
   clfswm/src/bindings-second-mode.lisp
   clfswm/src/clfswm-internal.lisp
   clfswm/src/clfswm-layout.lisp
   clfswm/src/config.lisp
Log:
Give a minimal size for windows. Center windows in the screen instead of in there frame. tile-space-current-frame bound on C-t.

Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog	(original)
+++ clfswm/ChangeLog	Wed May  7 16:09:35 2008
@@ -1,3 +1,19 @@
+2008-05-07  Philippe Brochard  <pbrochard at common-lisp.net>
+
+	* src/clfswm-internal.lisp (place-window-from-hints): Give a
+	minimal size for windows.
+
+	* src/config.lisp (*default-window-width/height*): New parameters.
+
+	* src/clfswm-internal.lisp (place-window-from-hints): Center
+	windows in the screen instead of in there frame.
+
+	* src/bindings-second-mode.lisp (tile-space-current-frame): New
+	binding on C-t.
+
+	* src/clfswm-layout.lisp (register-layout): Intern the once name
+	in the right package.
+
 2008-05-05  Philippe Brochard  <pbrochard at common-lisp.net>
 
 	* doc/dot-clfswmrc: Update to  follow the new clfswm way.

Modified: clfswm/clfswm.asd
==============================================================================
--- clfswm/clfswm.asd	(original)
+++ clfswm/clfswm.asd	Wed May  7 16:09:35 2008
@@ -57,7 +57,8 @@
 			 (:file "bindings"
 			  :depends-on ("clfswm" "clfswm-internal" "clfswm-util"))
 			 (:file "bindings-second-mode"
-			  :depends-on ("clfswm" "clfswm-util" "clfswm-query" "bindings" "clfswm-pack" "clfswm-menu" "menu-def"))))))
+			  :depends-on ("clfswm" "clfswm-util" "clfswm-query" "bindings" "clfswm-pack" "clfswm-menu" "menu-def"
+						"clfswm-layout"))))))
 
 
 

Modified: clfswm/src/bindings-second-mode.lisp
==============================================================================
--- clfswm/src/bindings-second-mode.lisp	(original)
+++ clfswm/src/bindings-second-mode.lisp	Wed May  7 16:09:35 2008
@@ -88,11 +88,17 @@
 (define-second-key ("exclam") 'run-program-from-query-string)
 
 
-(define-second-key (#\t) 'leave-second-mode)
 (define-second-key ("Return") 'leave-second-mode)
 (define-second-key ("Escape") 'leave-second-mode)
 
 
+(defun tile-space-current-frame ()
+  "Tile with spaces the current frame"
+  (explode-frame *current-child*)
+  (set-tile-space-layout-once)
+  (leave-second-mode))
+
+(define-second-key (#\t) 'tile-space-current-frame)
 
 (define-second-key ("Home" :mod-1 :control :shift) 'quit-clfswm)
 

Modified: clfswm/src/clfswm-internal.lisp
==============================================================================
--- clfswm/src/clfswm-internal.lisp	(original)
+++ clfswm/src/clfswm-internal.lisp	Wed May  7 16:09:35 2008
@@ -757,10 +757,10 @@
 		       (xlib:drawable-width window)))
 	   (rheight (or (and hints (or (xlib:wm-size-hints-height hints) (xlib:wm-size-hints-base-height hints)))
 			(xlib:drawable-height window))))
-      (setf (xlib:drawable-width window) (min (max min-width rwidth) max-width)
-	    (xlib:drawable-height window) (min (max min-height rheight) max-height))
-      (setf (xlib:drawable-x window) (truncate (+ (frame-rx *current-child*) (/ (- (frame-rw *current-child*) (xlib:drawable-width window)) 2)))
-	    (xlib:drawable-y window) (truncate (+ (frame-ry *current-child*) (/ (- (frame-rh *current-child*) (xlib:drawable-height window)) 2)))))))
+      (setf (xlib:drawable-width window) (min (max min-width rwidth *default-window-width*) max-width)
+	    (xlib:drawable-height window) (min (max min-height rheight *default-window-height*) max-height))
+            (setf (xlib:drawable-x window) (truncate (+ (frame-rx *current-child*) (/ (- (xlib:screen-width *screen*) (xlib:drawable-width window)) 2)))
+		  (xlib:drawable-y window) (truncate (+ (frame-ry *current-child*) (/ (- (xlib:screen-height *screen*) (xlib:drawable-height window)) 2)))))))
 
 
 

Modified: clfswm/src/clfswm-layout.lisp
==============================================================================
--- clfswm/src/clfswm-layout.lisp	(original)
+++ clfswm/src/clfswm-layout.lisp	Wed May  7 16:09:35 2008
@@ -66,10 +66,10 @@
 
 
 (defun register-layout (layout)
-  (let ((once-name (create-symbol (format nil "~A" layout) "-ONCE")))
+  (let ((once-name (intern (format nil "~A-ONCE" layout) :clfswm)))
     (setf (symbol-function once-name)
 	  (lambda ()
-	    (set-layout-dont-leave (intern (subseq (format nil "~A" layout) 4)))
+	    (set-layout-dont-leave (intern (subseq (format nil "~A" layout) 4) :clfswm))
 	    (show-all-children *current-root*)
 	    (fixe-real-size-current-child)
 	    (set-layout-dont-leave #'no-layout)))

Modified: clfswm/src/config.lisp
==============================================================================
--- clfswm/src/config.lisp	(original)
+++ clfswm/src/config.lisp	Wed May  7 16:09:35 2008
@@ -84,6 +84,10 @@
 (defparameter *color-unselected* "Blue")
 (defparameter *color-maybe-selected* "Yellow")
 
+;;; CONFIG: Default window size
+(defparameter *default-window-width* 400)
+(defparameter *default-window-height* 300)
+
 ;;; CONFIG: Second mode colors and fonts
 (defparameter *sm-border-color* "Green")
 (defparameter *sm-background-color* "Black")



More information about the clfswm-cvs mailing list