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

Philippe Brochard pbrochard at common-lisp.net
Sat May 9 21:52:25 UTC 2009


Author: pbrochard
Date: Sat May  9 17:52:25 2009
New Revision: 223

Log:
frame-toggle-maximize: New function: Maximize/Unmaximize the current frame in its parent frame.

Modified:
   clfswm/ChangeLog
   clfswm/TODO
   clfswm/src/bindings-second-mode.lisp
   clfswm/src/bindings.lisp
   clfswm/src/clfswm-util.lisp
   clfswm/src/menu-def.lisp

Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog	(original)
+++ clfswm/ChangeLog	Sat May  9 17:52:25 2009
@@ -1,5 +1,8 @@
 2009-05-09  Philippe Brochard  <pbrochard at common-lisp.net>
 
+	* src/clfswm-util.lisp (frame-toggle-maximize): New function:
+	Maximize/Unmaximize the current frame in its parent frame.
+
 	* src/clfswm-layout.lisp (maximize-layout): New layout: Maximize
 	windows and frames in there parent frame.
 

Modified: clfswm/TODO
==============================================================================
--- clfswm/TODO	(original)
+++ clfswm/TODO	Sat May  9 17:52:25 2009
@@ -7,9 +7,6 @@
 ===============
 Should handle these soon.
 
-- toggle-maximize-in-parent: maximize the current child in its parent (set its float coordinates
-    to 0 0 1 1)
-
 - Show config -> list and display documentation for all tweakable global variables. [Philippe]
    TODO :
    In ~/.clfswmrc:

Modified: clfswm/src/bindings-second-mode.lisp
==============================================================================
--- clfswm/src/bindings-second-mode.lisp	(original)
+++ clfswm/src/bindings-second-mode.lisp	Sat May  9 17:52:25 2009
@@ -107,6 +107,7 @@
   (define-second-key (#\Tab :shift) 'switch-to-last-child)
   (define-second-key ("Return" :mod-1) 'enter-frame)
   (define-second-key ("Return" :mod-1 :shift) 'leave-frame)
+  (define-second-key ("Return" :mod-5) 'frame-toggle-maximize)
   (define-second-key ("Page_Up" :mod-1) 'frame-lower-child)
   (define-second-key ("Page_Down" :mod-1) 'frame-raise-child)
   (define-second-key ("Home" :mod-1) 'switch-to-root-frame)

Modified: clfswm/src/bindings.lisp
==============================================================================
--- clfswm/src/bindings.lisp	(original)
+++ clfswm/src/bindings.lisp	Sat May  9 17:52:25 2009
@@ -41,14 +41,12 @@
   (define-main-key ("Left" :mod-1) 'select-previous-brother)
   (define-main-key ("Down" :mod-1) 'select-previous-level)
   (define-main-key ("Up" :mod-1) 'select-next-level)
-  ;; Work in progress
-  ;;  (define-circulate-modifier "Alt_L")
-  ;;  (define-circulate-reverse-modifier '("Shift_L" "Shift_R"))
   (define-main-key ("Tab" :mod-1) 'select-next-child)
   (define-main-key ("Tab" :mod-1 :shift) 'select-previous-child)
   (define-main-key ("Tab" :shift) 'switch-to-last-child)
   (define-main-key ("Return" :mod-1) 'enter-frame)
   (define-main-key ("Return" :mod-1 :shift) 'leave-frame)
+  (define-main-key ("Return" :mod-5) 'frame-toggle-maximize)
   (define-main-key ("Page_Up" :mod-1) 'frame-lower-child)
   (define-main-key ("Page_Down" :mod-1) 'frame-raise-child)
   (define-main-key ("Home" :mod-1) 'switch-to-root-frame)

Modified: clfswm/src/clfswm-util.lisp
==============================================================================
--- clfswm/src/clfswm-util.lisp	(original)
+++ clfswm/src/clfswm-util.lisp	Sat May  9 17:52:25 2009
@@ -214,6 +214,27 @@
 
 
 
+;;; Maximize function
+(defun frame-toggle-maximize ()
+  "Maximize/Unmaximize the current frame in its parent frame"
+  (when (frame-p *current-child*)
+    (let ((unmaximized-coords (frame-data-slot *current-child* :unmaximized-coords)))
+      (if unmaximized-coords
+	  (with-slots (x y w h) *current-child*
+	    (destructuring-bind (nx ny nw nh) unmaximized-coords
+	      (setf (frame-data-slot *current-child* :unmaximized-coords) nil
+		    x nx y ny w nw h nh)))
+	  (with-slots (x y w h) *current-child*
+	    (setf (frame-data-slot *current-child* :unmaximized-coords)
+		  (list x y w h)
+		  x 0 y 0 w 1 h 1))))
+    (show-all-children *current-root*)))
+
+
+
+
+
+
 
 
 
@@ -1218,4 +1239,3 @@
 
 
 
-

Modified: clfswm/src/menu-def.lisp
==============================================================================
--- clfswm/src/menu-def.lisp	(original)
+++ clfswm/src/menu-def.lisp	Sat May  9 17:52:25 2009
@@ -77,6 +77,7 @@
 
 
 (add-sub-menu 'frame-menu "a" 'frame-adding-menu "Adding frame menu")
+(add-menu-key 'frame-menu "x" 'frame-toggle-maximize)
 (add-sub-menu 'frame-menu "l" 'frame-layout-menu "Frame layout menu")
 (add-sub-menu 'frame-menu "n" 'frame-nw-hook-menu "Frame new window hook menu")
 (add-sub-menu 'frame-menu "m" 'frame-movement-menu "Frame movement menu")




More information about the clfswm-cvs mailing list