[clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-91-gedc2c5f

Philippe Brochard pbrochard at common-lisp.net
Mon Aug 20 20:29:28 UTC 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CLFSWM - A(nother) Common Lisp FullScreen Window Manager".

The branch, master has been updated
       via  edc2c5fc5132d75d9e287e17c804bb6861a0bd82 (commit)
      from  91618927d50d0afb934acb1668aea3db66245d39 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit edc2c5fc5132d75d9e287e17c804bb6861a0bd82
Author: Philipp Kroos <philipp.kroos at t-online.de>
Date:   Mon Aug 20 22:28:33 2012 +0200

    contrib/toolbar.lisp: Add an expose-mode-button-module.

diff --git a/ChangeLog b/ChangeLog
index 9d63d26..cc3d549 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-08-20  Philipp Kroos  <philipp.kroos at t-online.de>
+
+	* contrib/toolbar.lisp: Add an expose-mode-button-module.
+
 2012-08-19  Philippe Brochard  <pbrochard at common-lisp.net>
 
 	* contrib/toolbar.lisp (remove-toolbar): New function.
diff --git a/contrib/toolbar.lisp b/contrib/toolbar.lisp
index 0e2b27b..3493eb0 100644
--- a/contrib/toolbar.lisp
+++ b/contrib/toolbar.lisp
@@ -126,6 +126,11 @@
 (defconfig *toolbar-window-placement* 'top-left-placement
   'Placement "Toolbar window placement")
 
+(use-event-hook :exposure)
+(use-event-hook :button-press)
+(use-event-hook :motion-notify)
+(use-event-hook :leave-notify)
+
 (defun toolbar-symbol-fun (name &optional (type 'display))
   (create-symbol-in-package :clfswm 'toolbar- name '-module- type))
 
@@ -226,11 +231,6 @@
              (<= (+ win-x width (- *toolbar-sensibility*)) root-x (+ win-x width))
              (<= win-y root-y (+ win-y height)) (toolbar-autohide toolbar)))))
 
-(use-event-hook :exposure)
-(use-event-hook :button-press)
-(use-event-hook :motion-notify)
-(use-event-hook :leave-notify)
-
 
 (defun toolbar-add-exposure-hook (toolbar)
   (push (define-event-hook :exposure (window)
@@ -326,24 +326,25 @@
     (and (xlib:window-p win) (member win windows-list :test 'xlib:window-equal)))
 
   (defun close-toolbar (toolbar)
-    (erase-timer :refresh-toolbar-window)
-    (remove-toolbar-hook toolbar :exposure)
-    (remove-toolbar-hook toolbar :button-press)
-    (remove-toolbar-hook toolbar :leave-notify)
-    (remove-toolbar-hook toolbar :motion-notify)
-    (setf *never-managed-window-list*
-          (remove (list #'is-toolbar-window-p nil)
-                  *never-managed-window-list* :test #'equal))
-    (awhen (toolbar-gc toolbar)
-      (xlib:free-gcontext it))
-    (awhen (toolbar-window toolbar)
-      (xlib:destroy-window it))
-    (awhen (toolbar-font toolbar)
-      (xlib:close-font it))
-    (xlib:display-finish-output *display*)
-    (setf (toolbar-window toolbar) nil
-          (toolbar-gc toolbar) nil
-          (toolbar-font toolbar) nil))
+    (when (toolbar-p toolbar)
+      (erase-timer :refresh-toolbar-window)
+      (remove-toolbar-hook toolbar :exposure)
+      (remove-toolbar-hook toolbar :button-press)
+      (remove-toolbar-hook toolbar :leave-notify)
+      (remove-toolbar-hook toolbar :motion-notify)
+      (setf *never-managed-window-list*
+            (remove (list #'is-toolbar-window-p nil)
+                    *never-managed-window-list* :test #'equal))
+      (awhen (toolbar-gc toolbar)
+        (xlib:free-gcontext it))
+      (awhen (toolbar-window toolbar)
+        (xlib:destroy-window it))
+      (awhen (toolbar-font toolbar)
+        (xlib:close-font it))
+      (xlib:display-finish-output *display*)
+      (setf (toolbar-window toolbar) nil
+            (toolbar-gc toolbar) nil
+            (toolbar-font toolbar) nil)))
 
   (defun open-toolbar (toolbar)
     (let ((root (root (toolbar-root-x toolbar) (toolbar-root-y toolbar))))
@@ -666,3 +667,20 @@
                          cpu
                          (round (* (/ used total) 100)))))
 
+;;;
+;;; Expose-mode-button
+;;;
+(define-toolbar-color expose-mode-button "Expose-mode button")
+
+(define-toolbar-module (expose-mode-button text)
+  "On click, switch to expose-mode"
+  (with-set-toolbar-module-rectangle (module)
+    (toolbar-module-text toolbar module (tb-color expose-mode-button) (or text "Xpo"))))
+
+(define-toolbar-module-click (expose-mode-button)
+  "left click=Show only current frames ; Right click=show all roots frames"
+  (declare (ignore state toolbar module))
+  (if (= code 1)
+      (expose-windows-mode)
+      (expose-all-windows-mode)))
+

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog            |    4 +++
 contrib/toolbar.lisp |   64 ++++++++++++++++++++++++++++++++------------------
 2 files changed, 45 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
CLFSWM - A(nother) Common Lisp FullScreen Window Manager




More information about the clfswm-cvs mailing list