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

pbrochard at common-lisp.net pbrochard at common-lisp.net
Sat Mar 15 22:39:07 UTC 2008


Author: pbrochard
Date: Sat Mar 15 17:39:04 2008
New Revision: 45

Modified:
   clfswm/ChangeLog
   clfswm/TODO
   clfswm/src/bindings-second-mode.lisp
   clfswm/src/bindings.lisp
   clfswm/src/clfswm-internal.lisp
   clfswm/src/clfswm-util.lisp
   clfswm/src/clfswm.lisp
   clfswm/src/xlib-util.lisp
Log:
New functions: Show/hide groups info windows.


Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog	(original)
+++ clfswm/ChangeLog	Sat Mar 15 17:39:04 2008
@@ -1,3 +1,8 @@
+2008-03-15  Philippe Brochard  <hocwp at free.fr>
+
+	* src/clfswm-util.lisp (show/hide-all-groups-info/key): Show/hide all groups info 
+	window.
+
 2008-03-14  Philippe Brochard  <hocwp at free.fr>
 
 	* bindings-second-mode.lisp ("ISO_Left_Tab"): Use ISO_Left_Tab

Modified: clfswm/TODO
==============================================================================
--- clfswm/TODO	(original)
+++ clfswm/TODO	Sat Mar 15 17:39:04 2008
@@ -18,7 +18,8 @@
 
 
 - Hooks when a new window is mapped [Philippe]
-- Show group window for info (Wait for keypress or an amount of time) [Philippe]
+
+- Add boundaries in the info window [Philippe]
 
 
 MAYBE

Modified: clfswm/src/bindings-second-mode.lisp
==============================================================================
--- clfswm/src/bindings-second-mode.lisp	(original)
+++ clfswm/src/bindings-second-mode.lisp	Sat Mar 15 17:39:04 2008
@@ -208,6 +208,7 @@
 (define-second-key ("Delete") 'remove-current-child)
 
 
+
 ;;; default shell programs
 (defmacro define-shell (key name docstring cmd)
   "Define a second key to start a shell command"
@@ -225,6 +226,11 @@
 (define-shell (#\h) b-start-xclock "start an xclock" "exec xclock -d")
 
 
+(define-second-key ("Menu") 'show-all-groups-info-key)
+(define-second-key ("Menu" :shift) 'show-all-groups-info)
+(define-second-key ("Menu" :control) 'toggle-show-root-group)
+
+
 
 
 

Modified: clfswm/src/bindings.lisp
==============================================================================
--- clfswm/src/bindings.lisp	(original)
+++ clfswm/src/bindings.lisp	Sat Mar 15 17:39:04 2008
@@ -55,7 +55,10 @@
 (define-main-key ("Home" :mod-1) 'switch-to-root-group)
 (define-main-key ("Home" :mod-1 :shift) 'switch-and-select-root-group)
 
-(define-main-key ("Menu") 'toggle-show-root-group)
+
+(define-main-key ("Menu") 'show-all-groups-info-key)
+(define-main-key ("Menu" :shift) 'show-all-groups-info)
+(define-main-key ("Menu" :control) 'toggle-show-root-group)
 
 (define-main-key (#\b :mod-1) 'banish-pointer)
 
@@ -95,7 +98,8 @@
 
 
 (defun test-mouse-binding (window root-x root-y)
-  (dbg window root-x root-y))
+  (dbg window root-x root-y)
+  (replay-button-event))
 
 
 
@@ -138,8 +142,7 @@
     (replay-button-event)))
 
 
-(define-main-mouse (1) 'mouse-click-to-focus 'test-mouse-binding)
-
+(define-main-mouse (1) 'mouse-click-to-focus)
 
 (define-main-mouse (4) 'mouse-select-next-level)
 (define-main-mouse (5) 'mouse-select-previous-level)

Modified: clfswm/src/clfswm-internal.lisp
==============================================================================
--- clfswm/src/clfswm-internal.lisp	(original)
+++ clfswm/src/clfswm-internal.lisp	Sat Mar 15 17:39:04 2008
@@ -693,8 +693,7 @@
 	    (when (or (eql map-state :viewable)
 		      (eql wm-state +iconic-state+))
 	      (format t "Processing ~S: type=~A ~S~%" (xlib:wm-name win) (window-type win)win)
-	      ;;	    (unhide-window win)
 	      (process-new-window win)
-	      (xlib:map-window win)
+	      (raise-window win)
 	      (pushnew (xlib:window-id win) id-list))))))
     (netwm-set-client-list id-list)))

Modified: clfswm/src/clfswm-util.lisp
==============================================================================
--- clfswm/src/clfswm-util.lisp	(original)
+++ clfswm/src/clfswm-util.lisp	Sat Mar 15 17:39:04 2008
@@ -437,7 +437,7 @@
 
 
 
-
+;;; Force window functions
 (defun force-window-in-group ()
   "Force the current window to move in the group (Useful only for transient windows)"
   (when (xlib:window-p *current-child*)
@@ -462,6 +462,29 @@
 
 
 
+;;; Show group info
+(defun show-all-groups-info ()
+  "Show all groups info windows"
+  (with-all-groups (*current-root* group)
+    (raise-window (group-window group))
+    (display-group-info group)))
+
+(defun hide-all-groups-info ()
+  "Hide all groups info windows"
+  (with-all-windows (*current-root* window)
+    (raise-window window))
+  (show-all-childs))
+
+(defun show-all-groups-info-key ()
+  "Show all groups info windows until a key is release"
+  (with-all-groups (*current-root* group)
+    (raise-window (group-window group))
+    (display-group-info group))
+  (wait-no-key-or-button-press)
+  (hide-all-groups-info))
+
+
+
 ;;;;;,-----
 ;;;;;| Various definitions
 ;;;;;`-----

Modified: clfswm/src/clfswm.lisp
==============================================================================
--- clfswm/src/clfswm.lisp	(original)
+++ clfswm/src/clfswm.lisp	Sat Mar 15 17:39:04 2008
@@ -141,15 +141,15 @@
 (setf *key-press-hook* #'handle-key-press
       *configure-request-hook* #'handle-configure-request
       *configure-notify-hook* #'handle-configure-notify
-      *destroy-notify-hook* 'handle-destroy-notify
+      *destroy-notify-hook* #'handle-destroy-notify
       *enter-notify-hook* #'handle-enter-notify
-      *exposure-hook* 'handle-exposure
+      *exposure-hook* #'handle-exposure
       *map-request-hook* #'handle-map-request
-      *unmap-notify-hook* 'handle-unmap-notify
+      *unmap-notify-hook* #'handle-unmap-notify
       *create-notify-hook* #'handle-create-notify
-      *button-press-hook* 'handle-button-press
-      *button-release-hook* 'handle-button-release
-      *motion-notify-hook* 'handle-motion-notify)
+      *button-press-hook* #'handle-button-press
+      *button-release-hook* #'handle-button-release
+      *motion-notify-hook* #'handle-motion-notify)
 
 
 

Modified: clfswm/src/xlib-util.lisp
==============================================================================
--- clfswm/src/xlib-util.lisp	(original)
+++ clfswm/src/xlib-util.lisp	Sat Mar 15 17:39:04 2008
@@ -37,7 +37,10 @@
 				:colormap-change
 				:focus-change
 				:enter-window
-				:exposure)
+				:exposure
+				:button-press
+				:button-release
+				:pointer-motion)
   "The events to listen for on managed windows.")
 
 
@@ -387,11 +390,6 @@
 
 
 
-(defun stop-button-event ()
-  (xlib:allow-events *display* :sync-pointer))
-
-(defun replay-button-event ()
-  (xlib:allow-events *display* :replay-pointer))
     
 
 (defun ungrab-all-buttons (window)
@@ -405,6 +403,12 @@
 		    :sync-pointer-p t
 		    :sync-keyboard-p nil))
 
+(defun stop-button-event ()
+  (xlib:allow-events *display* :sync-pointer))
+
+(defun replay-button-event ()
+  (xlib:allow-events *display* :replay-pointer))
+
 
 
 (defun get-color (color)



More information about the clfswm-cvs mailing list