From pbrochard at common-lisp.net Thu Aug 2 23:26:27 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Thu, 02 Aug 2012 16:26:27 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-74-g95a7243 Message-ID: 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 95a724304aff7ae56e4f3a40e8d47d0a0b479cc9 (commit) from 63815916ba78e9aa6b4d7d605bf1b5c479fa3596 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ src/clfswm-internal.lisp | 2 +- src/clfswm-util.lisp | 38 ++++++++++++++++++++------------------ 3 files changed, 26 insertions(+), 19 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Thu Aug 2 23:26:27 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Thu, 02 Aug 2012 16:26:27 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-74-g95a7243 Message-ID: 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, test has been updated via 95a724304aff7ae56e4f3a40e8d47d0a0b479cc9 (commit) from 63815916ba78e9aa6b4d7d605bf1b5c479fa3596 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ src/clfswm-internal.lisp | 2 +- src/clfswm-util.lisp | 38 ++++++++++++++++++++------------------ 3 files changed, 26 insertions(+), 19 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Aug 3 20:47:11 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 03 Aug 2012 13:47:11 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-75-g856032b Message-ID: 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 856032b396ce727e4088dead645abccf3de0da2f (commit) from 95a724304aff7ae56e4f3a40e8d47d0a0b479cc9 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 3 +++ src/clfswm-expose-mode.lisp | 6 +++--- src/clfswm-internal.lisp | 19 ++++++++++++++----- src/clfswm-util.lisp | 6 +++--- 4 files changed, 23 insertions(+), 11 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Aug 3 20:47:11 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 03 Aug 2012 13:47:11 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-75-g856032b Message-ID: 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, test has been updated via 856032b396ce727e4088dead645abccf3de0da2f (commit) from 95a724304aff7ae56e4f3a40e8d47d0a0b479cc9 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 3 +++ src/clfswm-expose-mode.lisp | 6 +++--- src/clfswm-internal.lisp | 19 ++++++++++++++----- src/clfswm-util.lisp | 6 +++--- 4 files changed, 23 insertions(+), 11 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Aug 3 20:48:52 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 03 Aug 2012 13:48:52 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-76-ga91d6ae Message-ID: 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 a91d6aedd4da7e9b32d02e84ed0004cb9233b199 (commit) from 856032b396ce727e4088dead645abccf3de0da2f (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 a91d6aedd4da7e9b32d02e84ed0004cb9233b199 Author: Philippe Brochard Date: Fri Aug 3 22:48:45 2012 +0200 src/clfswm-internal.lisp (parse-xinerama-info): Remove test code diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index 5057285..daa76cf 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -809,9 +809,9 @@ XINERAMA version 1.1 opcode: 150 (destructuring-bind (w h x y) (parse-xinerama-info line) (push (list x y w h) sizes)))) - ;;(remove-duplicates sizes :test #'equal))))) + (remove-duplicates sizes :test #'equal))))) ;;'((10 10 500 300) (550 50 400 400) (100 320 400 270)))))) - '((10 10 500 580) (540 50 470 500)))))) + ;;'((10 10 500 580) (540 50 470 500)))))) (defun place-frames-from-xinerama-infos () ----------------------------------------------------------------------- Summary of changes: src/clfswm-internal.lisp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Aug 3 20:49:13 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 03 Aug 2012 13:49:13 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-76-ga91d6ae Message-ID: 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, test has been updated via a91d6aedd4da7e9b32d02e84ed0004cb9233b199 (commit) from 856032b396ce727e4088dead645abccf3de0da2f (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: src/clfswm-internal.lisp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Sun Aug 12 22:00:12 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sun, 12 Aug 2012 15:00:12 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-78-ge3718c6 Message-ID: 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 e3718c627e973d70fe2b88a0a25031b25d9008b7 (commit) via f84d45c7fba82a570abdf4c523a3870f2c39714f (commit) from a91d6aedd4da7e9b32d02e84ed0004cb9233b199 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 + TODO | 6 +- contrib/toolbar.lisp | 205 +++++++++++++++++++++++++++++++++------------- src/clfswm-internal.lisp | 16 ++-- src/clfswm-util.lisp | 10 ++ src/config.lisp | 2 +- src/package.lisp | 2 +- src/tools.lisp | 12 +++ src/xlib-util.lisp | 4 + 9 files changed, 193 insertions(+), 69 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Sun Aug 12 22:00:12 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sun, 12 Aug 2012 15:00:12 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-78-ge3718c6 Message-ID: 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, test has been updated via e3718c627e973d70fe2b88a0a25031b25d9008b7 (commit) via f84d45c7fba82a570abdf4c523a3870f2c39714f (commit) from a91d6aedd4da7e9b32d02e84ed0004cb9233b199 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 + TODO | 6 +- contrib/toolbar.lisp | 205 +++++++++++++++++++++++++++++++++------------- src/clfswm-internal.lisp | 16 ++-- src/clfswm-util.lisp | 10 ++ src/config.lisp | 2 +- src/package.lisp | 2 +- src/tools.lisp | 12 +++ src/xlib-util.lisp | 4 + 9 files changed, 193 insertions(+), 69 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Mon Aug 13 22:37:15 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Mon, 13 Aug 2012 15:37:15 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-79-gd71c361 Message-ID: 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 d71c361ef29714e3d8e4ad486ccb94f2f5a3b9dd (commit) from e3718c627e973d70fe2b88a0a25031b25d9008b7 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 8 +++ contrib/toolbar.lisp | 141 ++++++++++++++++++++++++++++++++------------------ src/clfswm.lisp | 3 +- src/package.lisp | 2 +- src/xlib-util.lisp | 12 ++++- 5 files changed, 113 insertions(+), 53 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Mon Aug 13 22:37:15 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Mon, 13 Aug 2012 15:37:15 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-79-gd71c361 Message-ID: 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, test has been updated via d71c361ef29714e3d8e4ad486ccb94f2f5a3b9dd (commit) from e3718c627e973d70fe2b88a0a25031b25d9008b7 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 8 +++ contrib/toolbar.lisp | 141 ++++++++++++++++++++++++++++++++------------------ src/clfswm.lisp | 3 +- src/package.lisp | 2 +- src/xlib-util.lisp | 12 ++++- 5 files changed, 113 insertions(+), 53 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Wed Aug 15 10:30:13 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Wed, 15 Aug 2012 03:30:13 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-84-g46bb64f Message-ID: 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 46bb64f71eca468fa55fc08e195e1924f4d559bb (commit) via a4dfa9630702d15e84dfa7333ada43e6c87ac0cf (commit) via ec5045f0dd335d16b9d2a0e634c38567c8107264 (commit) via 690b247a2d9c337c17f03ba37ef7adc73f3612aa (commit) via a9fd335a851dfe92e19c6bdb97807509bf1107be (commit) from d71c361ef29714e3d8e4ad486ccb94f2f5a3b9dd (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 46bb64f71eca468fa55fc08e195e1924f4d559bb Author: Philippe Brochard Date: Wed Aug 15 00:28:54 2012 +0200 contrib/toolbar.lisp: Add a clickable label module for toolbar. Add a clickable entry to open the CLFSWM main menu. * src/clfswm-menu.lisp (open-menu): Prevent to reopen an opened menu. Fixe a but with negative selected-item. diff --git a/ChangeLog b/ChangeLog index 710c0d5..cc1b9ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-08-15 Philippe Brochard + + * contrib/toolbar.lisp: Add a clickable label module for toolbar. + Add a clickable entry to open the CLFSWM main menu. + + * src/clfswm-menu.lisp (open-menu): Prevent to reopen an opened + menu. Fixe a but with negative selected-item. + 2012-08-14 Philippe Brochard * src/clfswm-util.lisp (eval-from-query-string): Show a notify diff --git a/contrib/toolbar.lisp b/contrib/toolbar.lisp index d257049..3ddaa46 100644 --- a/contrib/toolbar.lisp +++ b/contrib/toolbar.lisp @@ -264,7 +264,8 @@ (dolist (module (toolbar-modules toolbar)) (when (and (in-rectangle root-x root-y (toolbar-module-rect module)) (fboundp (toolbar-module-click-fun module))) - (funcall (toolbar-module-click-fun module) toolbar module code state) + (apply (toolbar-module-click-fun module) toolbar module code state + (toolbar-module-args module)) (stop-button-event) (exit-handle-event)))))) @@ -419,18 +420,18 @@ -(defmacro define-toolbar-module ((name &optional args) &body body) +(defmacro define-toolbar-module ((name &rest args) &body body) (let ((symbol-fun (toolbar-symbol-fun name))) `(progn (pushnew ',name *toolbar-module-list*) - (defun ,symbol-fun (toolbar module ,@(when args `(&optional ,args))) + (defun ,symbol-fun (toolbar module ,@(when args `(&optional , at args))) , at body)))) -(defmacro define-toolbar-module-click ((name) &body body) +(defmacro define-toolbar-module-click ((name &rest args) &body body) (let ((symbol-fun (toolbar-symbol-fun name 'click))) `(progn (pushnew ',name *toolbar-module-list*) - (defun ,symbol-fun (toolbar module code state) + (defun ,symbol-fun (toolbar module code state ,@(when args `(&optional , at args))) , at body)))) @@ -476,6 +477,21 @@ (toolbar-module-text toolbar module (or text "Empty"))) ;;; +;;; Clickable label module +;;; +(define-toolbar-module (clickable-label text action) + "(text action) - Display a clickable text in toolbar" + (declare (ignore action)) + (with-set-toolbar-module-rectangle (module) + (toolbar-module-text toolbar module (or text "Empty")))) + +(define-toolbar-module-click (clickable-label text action) + "Call the function 'action'" + (declare (ignore text)) + (when action + (funcall action toolbar module code state ))) + +;;; ;;; Clickable clock module ;;; (define-toolbar-module (clickable-clock) @@ -498,3 +514,21 @@ (format t "done~%") + + +;;; +;;; CLFSWM menu module +;;; +(define-toolbar-module (clfswm-menu text placement) + "(text placement) - Display an entry for the CLFSWM menu" + (declare (ignore placement)) + (with-set-toolbar-module-rectangle (module) + (toolbar-module-text toolbar module (or text "CLFSWM")))) + +(define-toolbar-module-click (clfswm-menu text placement) + "Open the CLFSWM main menu" + (declare (ignore text code state toolbar module)) + (dbg placement) + (let ((*info-mode-placement* (or placement *info-mode-placement*))) + (open-menu))) + diff --git a/src/clfswm-menu.lisp b/src/clfswm-menu.lisp index ca667fa..29b438e 100644 --- a/src/clfswm-menu.lisp +++ b/src/clfswm-menu.lisp @@ -137,34 +137,41 @@ (funcall action))))) -(defun open-menu (&optional (menu *menu*) (parent nil)) - "Open the main menu" - (when menu - (let ((action nil) - (old-info-keys (copy-hash-table *info-keys*))) - (labels ((populate-menu () - (let ((info-list nil)) - (dolist (item (menu-item menu)) - (let ((value (menu-item-value item))) - (push (typecase value - (menu (list (list (format nil "~A" (menu-item-key item)) *menu-color-menu-key*) - (list (format nil ": < ~A >" (menu-doc value)) *menu-color-submenu*))) - (string (list (list (format nil "~A" (menu-item-value item)) *menu-color-comment*))) - (t (list (list (format nil "~A" (menu-item-key item)) *menu-color-key*) - (format nil ": ~A" (documentation value 'function))))) - info-list) - (when (menu-item-key item) - (define-info-key-fun (list (menu-item-key item)) - (lambda (&optional args) - (declare (ignore args)) - (setf action value) - (leave-info-mode nil)))))) - (nreverse info-list)))) - (let ((selected-item (info-mode (populate-menu)))) - (setf *info-keys* old-info-keys) - (when selected-item - (awhen (nth selected-item (menu-item menu)) - (setf action (menu-item-value it))))) - (open-menu-do-action action menu parent))))) +(let ((menu-oppened nil)) + (defun reset-open-menu () + (setf menu-oppened nil)) + + (defun open-menu (&optional (menu *menu*) (parent nil)) + "Open the main menu" + (unless menu-oppened + (setf menu-oppened t) + (when menu + (let ((action nil) + (old-info-keys (copy-hash-table *info-keys*))) + (labels ((populate-menu () + (let ((info-list nil)) + (dolist (item (menu-item menu)) + (let ((value (menu-item-value item))) + (push (typecase value + (menu (list (list (format nil "~A" (menu-item-key item)) *menu-color-menu-key*) + (list (format nil ": < ~A >" (menu-doc value)) *menu-color-submenu*))) + (string (list (list (format nil "~A" (menu-item-value item)) *menu-color-comment*))) + (t (list (list (format nil "~A" (menu-item-key item)) *menu-color-key*) + (format nil ": ~A" (documentation value 'function))))) + info-list) + (when (menu-item-key item) + (define-info-key-fun (list (menu-item-key item)) + (lambda (&optional args) + (declare (ignore args)) + (setf action value) + (leave-info-mode nil)))))) + (nreverse info-list)))) + (let ((selected-item (info-mode (populate-menu)))) + (setf *info-keys* old-info-keys) + (when (and selected-item (>= selected-item 0)) + (awhen (nth selected-item (menu-item menu)) + (setf action (menu-item-value it))))) + (setf menu-oppened nil) + (open-menu-do-action action menu parent))))))) diff --git a/src/clfswm.lisp b/src/clfswm.lisp index d88a92d..f8429ce 100644 --- a/src/clfswm.lisp +++ b/src/clfswm.lisp @@ -185,6 +185,7 @@ (defun init-display () (reset-root-list) (reset-bind-or-jump-slots) + (reset-open-menu) (fill-handle-event-fun-symbols) (assoc-keyword-handle-event 'main-mode) (setf *screen* (first (xlib:display-roots *display*)) commit a4dfa9630702d15e84dfa7333ada43e6c87ac0cf Author: Philippe Brochard Date: Tue Aug 14 23:30:15 2012 +0200 src/clfswm-util.lisp (show-current-root): New function and configuration menu to display a message on the current root. diff --git a/ChangeLog b/ChangeLog index 42652c5..710c0d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * src/clfswm-util.lisp (eval-from-query-string): Show a notify window when updating symobls list for REPL completion. + (show-current-root): New function and configuration menu to + display a message on the current root. * contrib/toolbar.lisp: Add arguments in toolbar modules. diff --git a/src/clfswm-second-mode.lisp b/src/clfswm-second-mode.lisp index ba6055b..49b528a 100644 --- a/src/clfswm-second-mode.lisp +++ b/src/clfswm-second-mode.lisp @@ -135,6 +135,7 @@ (grab-main-keys) (show-all-children) (display-all-frame-info) + (raise-notify-window) (wait-no-key-or-button-press) (setf *in-second-mode* nil)) diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp index 79aa767..6ac0742 100644 --- a/src/clfswm-util.lisp +++ b/src/clfswm-util.lisp @@ -81,6 +81,11 @@ ;;; Root functions utility +(defun show-current-root () + (when *have-to-show-current-root* + (let ((*notify-window-placement* *show-current-root-placement*)) + (notify-message *show-current-root-delay* *show-current-root-message*)))) + (defun select-generic-root (fun restart-menu) (no-focus) (let* ((current-root (find-root (current-child))) @@ -92,6 +97,7 @@ it (frame-selected-child parent)))))) (show-all-children t) + (show-current-root) (if restart-menu (open-menu (find-menu 'root-menu)) (leave-second-mode))) @@ -118,6 +124,7 @@ (no-focus) (funcall fun) (show-all-children t) + (show-current-root) (if restart-menu (open-menu (find-menu 'root-menu)) (leave-second-mode))) @@ -156,6 +163,7 @@ (exchange-root-geometry (find-root-by-coordinates x1 y1) (find-root-by-coordinates x2 y2)))) (show-all-children) + (show-current-root) (leave-second-mode)) (defun change-current-root-geometry () @@ -168,6 +176,7 @@ (setf (root-x root) x (root-y root) y (root-w root) w (root-h root) h) (show-all-children) + (show-current-root) (leave-second-mode))) @@ -1696,17 +1705,21 @@ For window: set current child to window or its parent according to window-parent (when (and (xlib:window-p win) (xlib:window-p window)) (xlib:window-equal win window))) + (defun raise-notify-window () + (raise-window window)) + (defun refresh-notify-window () (add-timer 0.1 #'refresh-notify-window :refresh-notify-window) - (raise-window window) - (let ((text-height (- (xlib:font-ascent font) (xlib:font-descent font)))) - (loop for tx in text - for i from 1 do - (setf (xlib:gcontext-foreground gc) (text-color tx)) - (xlib:draw-glyphs window gc - (truncate (/ (- width (* (xlib:max-char-width font) (length (text-string tx)))) 2)) - (* text-height i 2) - (text-string tx))))) + (when (and window gc font) + (raise-window window) + (let ((text-height (- (xlib:font-ascent font) (xlib:font-descent font)))) + (loop for tx in text + for i from 1 do + (setf (xlib:gcontext-foreground gc) (text-color tx)) + (xlib:draw-glyphs window gc + (truncate (/ (- width (* (xlib:max-char-width font) (length (text-string tx)))) 2)) + (* text-height i 2) + (text-string tx)))))) (defun close-notify-window () (erase-timer :refresh-notify-window) diff --git a/src/config.lisp b/src/config.lisp index 227aa76..7fdd999 100644 --- a/src/config.lisp +++ b/src/config.lisp @@ -175,11 +175,19 @@ This command must set the window title to *clfswm-terminal-name*") (defconfig *query-button-press-hook* nil 'Hook "Query hook. Hook called on each button press event in query loop") -;;; CONFIG +;;; CONFIG: Root (defconfig *create-frame-on-root* nil - nil "Create frame on root. + 'Root "Create frame on root. Set this variable to true if you want to allow to create a new frame on the root window in the main mode with the mouse") +(defconfig *have-to-show-current-root* t + 'Root "Show the current root if true") +(defconfig *show-current-root-delay* 1 + 'Root "Delay to show the current root") +(defconfig *show-current-root-placement* 'middle-middle-root-placement + 'Root "Current root notify window placement") +(defconfig *show-current-root-message* "Current root" + 'Root "Current root notify window message") ;;; CONFIG: Main mode colors commit ec5045f0dd335d16b9d2a0e634c38567c8107264 Author: Philippe Brochard Date: Tue Aug 14 16:45:30 2012 +0200 src/clfswm-util.lisp (eval-from-query-string): Show a notify window when updating symobls list for REPL completion. diff --git a/ChangeLog b/ChangeLog index 3fdcaef..42652c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,11 @@ 2012-08-14 Philippe Brochard + * src/clfswm-util.lisp (eval-from-query-string): Show a notify + window when updating symobls list for REPL completion. + * contrib/toolbar.lisp: Add arguments in toolbar modules. - * src/xlib-util.lisp (event-hook-name): Intern hook name symbole + * src/xlib-util.lisp (event-hook-name): Intern hook name symbol in :clfswm package. 2012-08-13 Philippe Brochard diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp index bd5036a..79aa767 100644 --- a/src/clfswm-util.lisp +++ b/src/clfswm-util.lisp @@ -577,7 +577,10 @@ (pushnew (string-downcase (if (string= (first elem) "(") (third elem) (second elem))) all-symbols :test #'string=))) (when (search "in-package" form :test #'string-equal) - (setf all-symbols (collect-all-symbols))) + (let ((*notify-window-placement* 'middle-middle-root-placement)) + (open-notify-window '("Collecting all symbols for Lisp REPL completion.")) + (setf all-symbols (collect-all-symbols)) + (close-notify-window))) (when ret (eval-from-query-string)))))))) commit 690b247a2d9c337c17f03ba37ef7adc73f3612aa Author: Philippe Brochard Date: Tue Aug 14 16:22:56 2012 +0200 contrib/toolbar.lisp: Add arguments in toolbar modules. diff --git a/ChangeLog b/ChangeLog index a5387d2..3fdcaef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2012-08-14 Philippe Brochard + * contrib/toolbar.lisp: Add arguments in toolbar modules. + * src/xlib-util.lisp (event-hook-name): Intern hook name symbole in :clfswm package. diff --git a/contrib/toolbar.lisp b/contrib/toolbar.lisp index 8642423..d257049 100644 --- a/contrib/toolbar.lisp +++ b/contrib/toolbar.lisp @@ -40,9 +40,9 @@ ;;; root-x, root-y: root coordinates or if root-y is nil, root-x is the nth root in root-list. ;;; direction: one of :horiz or :vert ;;; placement: same argument as with-placement macro -;;; modules: list of modules: a list of module name and position in percent. +;;; modules: list of modules: a list of module name, position in percent and arguments. ;;; 0%=left/up <-> 100%=right/down. -;;; Example: '((clock 1) (label 50) (clickable-clock 90)) +;;; Example: '((clock 1) (label 50 \"My label\") (clickable-clock 90)) ;;; size: toolbar size in percent of root size ;;; thickness: toolbar height for horizontal toolbar or width for vertical one ;;; autohide: one of nil, :click, or :motion @@ -55,20 +55,20 @@ ;;; ;; Add an horizontal toolbar on root at coordinates 0,0 pixels ;;; ;;; (add-toolbar 0 0 :horiz 90 'top-middle-root-placement -;;; '((clock 1) (label 50) (clock-second 25) (clickable-clock 99)) +;;; '((clock 1) (label 50 "Plop") (clock-second 25) (clickable-clock 99)) ;;; :autohide :click ;;; :refresh-delay 1) ;;; ;;; ;;; ;; Add an horizontal toolbar on root at coordinates 0,0 pixels ;;; -;;; (add-toolbar 0 0 :horiz 70 'bottom-middle-root-placement '((clock 1) (label 50) (clock 99)) +;;; (add-toolbar 0 0 :horiz 70 'bottom-middle-root-placement '((clock 1) (label 50 "Paf) (clock 99)) ;;; :autohide :motion) ;;; ;;; ;;; ;; Add a vertical toolbar on root 0 ;;; -;;; (add-toolbar 0 nil :vert 60 'middle-left-root-placement '((clock 1) (label 50) (clock 90))) +;;; (add-toolbar 0 nil :vert 60 'middle-left-root-placement '((clock 1) (label 50 "My label") (clock 90))) ;;; ;;; ;;; ;; Add a vertical toolbar on root 1 @@ -83,7 +83,7 @@ (defstruct toolbar root-x root-y root direction size thickness placement refresh-delay autohide modules clickable hide-state font window gc border-size) -(defstruct toolbar-module name pos display-fun click-fun rect) +(defstruct toolbar-module name pos display-fun click-fun args rect) (defparameter *toolbar-list* nil) (defparameter *toolbar-module-list* nil) @@ -114,7 +114,7 @@ 'Placement "Toolbar window placement") (defun toolbar-symbol-fun (name &optional (type 'display)) - (create-symbol 'toolbar- name '-module- type)) + (create-symbol-in-package :clfswm 'toolbar- name '-module- type)) (defun toolbar-adjust-root-size (toolbar) (unless (toolbar-autohide toolbar) @@ -184,7 +184,7 @@ (clear-pixmap-buffer (toolbar-window toolbar) (toolbar-gc toolbar)) (dolist (module (toolbar-modules toolbar)) (when (fboundp (toolbar-module-display-fun module)) - (funcall (toolbar-module-display-fun module) toolbar module))) + (apply (toolbar-module-display-fun module) toolbar module (toolbar-module-args module)))) (copy-pixmap-buffer (toolbar-window toolbar) (toolbar-gc toolbar)))) (defun toolbar-in-sensibility-zone-p (toolbar root-x root-y) @@ -366,6 +366,7 @@ :pos (second mod) :display-fun (toolbar-symbol-fun (first mod)) :click-fun (toolbar-symbol-fun (first mod) 'click) + :args (cddr mod) :rect nil))) @@ -378,9 +379,9 @@ root-x, root-y: root coordinates or if root-y is nil, root-x is the nth root in root-list. direction: one of :horiz or :vert placement: same argument as with-placement macro - modules: list of modules: a list of module name and position in percent. + modules: list of modules: a list of module name, position in percent and arguments. 0%=left/up <-> 100%=right/down. - Example: '((clock 1) (label 50) (clickable-clock 90)) + Example: '((clock 1) (label 50 \"My label\") (clickable-clock 90)) size: toolbar size in percent of root size thickness: toolbar height for horizontal toolbar or width for vertical one autohide: one of nil, :click, or :motion @@ -418,11 +419,11 @@ -(defmacro define-toolbar-module ((name) &body body) +(defmacro define-toolbar-module ((name &optional args) &body body) (let ((symbol-fun (toolbar-symbol-fun name))) `(progn (pushnew ',name *toolbar-module-list*) - (defun ,symbol-fun (toolbar module) + (defun ,symbol-fun (toolbar module ,@(when args `(&optional ,args))) , at body)))) (defmacro define-toolbar-module-click ((name) &body body) @@ -446,6 +447,10 @@ ;;; ;;; Modules definitions ;;; + +;;; +;;; Clock module +;;; (define-toolbar-module (clock) "A clock module" (multiple-value-bind (s m h) @@ -453,6 +458,9 @@ (declare (ignore s)) (toolbar-module-text toolbar module "~2,'0D:~2,'0D" h m))) +;;; +;;; Clock module with seconds +;;; (define-toolbar-module (clock-second) "A clock module with seconds" (multiple-value-bind (s m h) @@ -460,25 +468,33 @@ (toolbar-module-text toolbar module "~2,'0D:~2,'0D:~2,'0D" h m s))) -(define-toolbar-module (label) - "A label module (for test)" - (toolbar-module-text toolbar module "Label")) - +;;; +;;; Label module +;;; +(define-toolbar-module (label text) + "(text) - Display a text in toolbar" + (toolbar-module-text toolbar module (or text "Empty"))) +;;; +;;; Clickable clock module +;;; (define-toolbar-module (clickable-clock) "A clickable clock module" (multiple-value-bind (s m h) (get-decoded-time) (declare (ignore s)) (with-set-toolbar-module-rectangle (module) - (toolbar-module-text toolbar module "Click:~2,'0D:~2,'0D" h m)))) + (toolbar-module-text toolbar module "|~2,'0D:~2,'0D|" h m)))) + +(defconfig *toolbar-clock-action* "xclock -analog" + 'toolbar "Toolbar clickable clock module action on click") (define-toolbar-module-click (clickable-clock) - "Start a digital clock" + "Start an external clock" (declare (ignore toolbar module state)) (when (= code 1) - (do-shell "xclock"))) + (do-shell *toolbar-clock-action*))) (format t "done~%") commit a9fd335a851dfe92e19c6bdb97807509bf1107be Author: Philippe Brochard Date: Tue Aug 14 15:09:15 2012 +0200 src/xlib-util.lisp (event-hook-name): Intern hook name symbole in :clfswm package. diff --git a/ChangeLog b/ChangeLog index 7095879..a5387d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-08-14 Philippe Brochard + + * src/xlib-util.lisp (event-hook-name): Intern hook name symbole + in :clfswm package. + 2012-08-13 Philippe Brochard * contrib/toolbar.lisp (toolbar-module-text): Print a formatted diff --git a/src/xlib-util.lisp b/src/xlib-util.lisp index ca75d1c..308a988 100644 --- a/src/xlib-util.lisp +++ b/src/xlib-util.lisp @@ -173,9 +173,12 @@ Expand in handle-event-fun-main-mode-key-press" (defun event-hook-name (event-keyword) - (create-symbol '*event- event-keyword '-hook*)) + (create-symbol-in-package :clfswm '*event- event-keyword '-hook*)) (let ((event-hook-list nil)) + (defun get-event-hook-list () + event-hook-list) + (defmacro use-event-hook (event-keyword) (let ((symb (event-hook-name event-keyword))) (pushnew symb event-hook-list) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 20 +++++++++ contrib/toolbar.lisp | 92 +++++++++++++++++++++++++++++++++---------- src/clfswm-menu.lisp | 65 +++++++++++++++++------------- src/clfswm-second-mode.lisp | 1 + src/clfswm-util.lisp | 36 ++++++++++++----- src/clfswm.lisp | 1 + src/config.lisp | 12 +++++- src/xlib-util.lisp | 5 ++- 8 files changed, 169 insertions(+), 63 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Thu Aug 16 20:43:45 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Thu, 16 Aug 2012 13:43:45 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-87-g54755d7 Message-ID: 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 54755d729577bffeaada06bb44a1475f2ec8614b (commit) via 788919822efa6da4598159b4da3cc3d479f9de80 (commit) via 0775a9397e6a3526d6106e5f59f6cf1fdd68b0b9 (commit) from 46bb64f71eca468fa55fc08e195e1924f4d559bb (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 54755d729577bffeaada06bb44a1475f2ec8614b Author: Philippe Brochard Date: Thu Aug 16 22:43:39 2012 +0200 src/tools.lisp: Factorize system usage information collection. diff --git a/ChangeLog b/ChangeLog index 278c7cd..26d6f77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2012-08-16 Philippe Brochard + * src/tools.lisp: Factorize system usage information collection. + * contrib/toolbar.lisp: Add memory, cpu and battery usage module with a poll methode. More responsive but up to date every 10s by default. diff --git a/contrib/toolbar.lisp b/contrib/toolbar.lisp index bcd1f62..8e0faac 100644 --- a/contrib/toolbar.lisp +++ b/contrib/toolbar.lisp @@ -371,7 +371,8 @@ (defun close-all-toolbars () (dolist (toolbar *toolbar-list*) - (close-toolbar toolbar))) + (close-toolbar toolbar)) + (stop-system-poll)) (defun create-toolbar-modules (modules) (loop for mod in modules @@ -512,7 +513,7 @@ (get-decoded-time) (declare (ignore s)) (with-set-toolbar-module-rectangle (module) - (toolbar-module-text toolbar module "(~2,'0D:~2,'0D)" h m)))) + (toolbar-module-text toolbar module "~2,'0D:~2,'0D" h m)))) (defconfig *toolbar-clock-action* "xclock -analog" @@ -535,7 +536,7 @@ "(text placement) - Display an entry for the CLFSWM menu" (declare (ignore placement)) (with-set-toolbar-module-rectangle (module) - (toolbar-module-text toolbar module (or text "(CLFSWM)")))) + (toolbar-module-text toolbar module (or text "CLFSWM")))) (define-toolbar-module-click (clfswm-menu text placement) "Open the CLFSWM main menu" @@ -547,7 +548,7 @@ ;;; CPU usage ;;; (define-toolbar-module (cpu) - "Display the CPU usage" + "Display the CPU usage (slow methode)" (toolbar-module-text toolbar module "CPU:~A%" (cpu-usage))) @@ -555,7 +556,7 @@ ;;; Memory usage ;;; (define-toolbar-module (mem) - "Display the memory usage" + "Display the memory usage (slow methode)" (multiple-value-bind (used total) (memory-usage) (toolbar-module-text toolbar module "Mem:~A%" (round (* (/ used total) 100.0))))) @@ -566,7 +567,7 @@ ;;; Battery usage ;;; (define-toolbar-module (bat) - "Display the battery usage" + "Display the battery usage (slow methode)" (let* ((bat (battery-usage)) (alert (battery-alert-string bat))) (toolbar-module-text toolbar module "Bat:~A~A%~A" alert bat alert))) @@ -595,3 +596,4 @@ (toolbar-module-text toolbar module "CPU:~A% Mem:~A%" cpu (round (* (/ used total) 100))))) + diff --git a/src/tools.lisp b/src/tools.lisp index 22b06b9..81f06c7 100644 --- a/src/tools.lisp +++ b/src/tools.lisp @@ -1048,56 +1048,82 @@ Useful for re-using the &REST arg after removing some options." ;;; ;;; System information functions ;;; +(defparameter *bat-cmd* "acpi -b") +(defparameter *cpu-cmd* "top -b -n 2 -d 1 -p 0") +(defparameter *cpu-cmd-fast* "top -b -n 2 -d 0.1 -p 0") +(defparameter *mem-cmd* "free") + (defmacro with-search-line ((word line) &body body) `(let ((pos (search ,word ,line :test #'string-equal))) (when (>= (or pos -1) 0) , at body))) -(defun memory-usage () - (let ((output (do-shell "free")) - (used 0) - (total 0)) - (loop for line = (read-line output nil nil) - while line - do (with-search-line ("cache:" line) - (setf used (parse-integer (subseq line (+ pos 6)) :junk-allowed t))) - (with-search-line ("mem:" line) - (setf total (parse-integer (subseq line (+ pos 4)) :junk-allowed t)))) - (values used total))) +(defun extract-battery-usage (line) + (with-search-line ("Battery" line) + (let ((pos (position #\% line))) + (when pos + (parse-integer (subseq line (- pos 3) pos) :junk-allowed t))))) + +(defun extract-cpu-usage (line) + (with-search-line ("%Cpu(s):" line) + (let ((pos1 (search "id" line))) + (when pos1 + (let ((pos2 (position #\, line :from-end t :end pos1))) + (when pos2 + (- 100 (parse-integer (subseq line (1+ pos2) pos1) :junk-allowed t)))))))) + +(defun extract-mem-used (line) + (with-search-line ("cache:" line) + (parse-integer (subseq line (+ pos 6)) :junk-allowed t))) + +(defun extract-mem-total (line) + (with-search-line ("mem:" line) + (parse-integer (subseq line (+ pos 4)) :junk-allowed t))) + +(let ((total -1)) + (defun memory-usage () + (let ((output (do-shell *mem-cmd*)) + (used -1)) + (loop for line = (read-line output nil nil) + while line + do (awhen (extract-mem-used line) + (setf used it)) + (awhen (and (= total -1) (extract-mem-total line)) + (setf total it))) + (values used total)))) (defun cpu-usage () - (let ((output (do-shell "top -b -n 2 -d 0.1")) - (cpu 0)) + (let ((output (do-shell *cpu-cmd-fast*)) + (cpu -1)) (loop for line = (read-line output nil nil) while line - do (with-search-line ("%Cpu(s):" line) - (setf cpu (parse-integer (subseq line (+ pos 8)) :junk-allowed t)))) + do (awhen (extract-cpu-usage line) + (setf cpu it))) cpu)) (defun battery-usage () - (let ((output (do-shell "acpi -b")) - (bat 0)) + (let ((output (do-shell *bat-cmd*)) + (bat -1)) (loop for line = (read-line output nil nil) while line - do (with-search-line ("%" line) - (setf bat (parse-integer (subseq line (- pos 3) pos) :junk-allowed t)))) + do (awhen (extract-battery-usage line) + (setf bat it))) bat)) (defun battery-alert-string (bat) - (cond ((<= bat 5) "/!\\") - ((<= bat 10) "!!") - ((<= bat 25) "!") - (t ""))) + (if (numberp bat) + (cond ((<= bat 5) "/!\\") + ((<= bat 10) "!!") + ((<= bat 25) "!") + (t "")) + "")) ;;; ;;; System usage with a poll system - Memory, CPU and battery all in one ;;; -(let ((poll-log "/tmp/clfswm-system.log") - (bat-cmd "acpi -b") - (cpu-cmd "top -b -n 2 -d 1 | grep '%Cpu(s)'") - (mem-cmd "free") - (poll-exec "/tmp/clfswm-system.sh") +(let ((poll-log "/tmp/.clfswm-system.log") + (poll-exec "/tmp/.clfswm-system.sh") (running nil)) (defun create-system-poll (delay) (with-open-file (stream poll-exec :direction :output :if-exists :supersede) @@ -1107,8 +1133,7 @@ while true; do (~A; ~A ; ~A) > ~A.tmp; mv ~A.tmp ~A; sleep ~A; -done~%" bat-cmd cpu-cmd mem-cmd poll-log poll-log poll-log delay)) - (fdo-shell "/bin/chmod a+x ~A" poll-exec)) +done~%" *bat-cmd* *cpu-cmd* *mem-cmd* poll-log poll-log poll-log delay))) (defun system-poll-pid () (let ((pid nil)) @@ -1122,13 +1147,17 @@ done~%" bat-cmd cpu-cmd mem-cmd poll-log poll-log poll-log delay)) (defun stop-system-poll () (dolist (pid (system-poll-pid)) (fdo-shell "kill ~A" pid)) + (when (probe-file poll-log) + (delete-file poll-log)) + (when (probe-file poll-exec) + (delete-file poll-exec)) (setf running nil)) (defun start-system-poll (delay) (unless running (stop-system-poll) (create-system-poll delay) - (do-execute poll-exec nil nil :stream) + (fdo-shell "exec sh ~A" poll-exec) (setf running t))) (defun system-usage-poll (&optional (delay 10)) @@ -1141,17 +1170,15 @@ done~%" bat-cmd cpu-cmd mem-cmd poll-log poll-log poll-log delay)) (with-open-file (stream poll-log :direction :input) (loop for line = (read-line stream nil nil) while line - do (with-search-line ("Battery" line) - (let ((pos (position #\% line))) - (when pos - (setf bat (parse-integer (subseq line (- pos 3) pos) :junk-allowed t))))) - (with-search-line ("%Cpu(s):" line) - (setf cpu (parse-integer (subseq line (+ pos 8)) :junk-allowed t))) - (with-search-line ("cache:" line) - (setf used (parse-integer (subseq line (+ pos 6)) :junk-allowed t))) - (with-search-line ("mem:" line) - (setf total (parse-integer (subseq line (+ pos 4)) :junk-allowed t)))) - (values cpu used total bat)))))) + do (awhen (extract-battery-usage line) + (setf bat it)) + (awhen (extract-cpu-usage line) + (setf cpu it)) + (awhen (extract-mem-used line) + (setf used it)) + (awhen (and (= total -1) (extract-mem-total line)) + (setf total it))))) + (values cpu used total bat)))) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 9 +++ contrib/toolbar.lisp | 71 ++++++++++++++++++++++- src/tools.lisp | 153 +++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 228 insertions(+), 5 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Thu Aug 16 20:43:45 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Thu, 16 Aug 2012 13:43:45 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-86-g7889198 Message-ID: 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, test has been updated via 788919822efa6da4598159b4da3cc3d479f9de80 (commit) via 0775a9397e6a3526d6106e5f59f6cf1fdd68b0b9 (commit) via 46bb64f71eca468fa55fc08e195e1924f4d559bb (commit) via a4dfa9630702d15e84dfa7333ada43e6c87ac0cf (commit) via ec5045f0dd335d16b9d2a0e634c38567c8107264 (commit) via 690b247a2d9c337c17f03ba37ef7adc73f3612aa (commit) via a9fd335a851dfe92e19c6bdb97807509bf1107be (commit) from d71c361ef29714e3d8e4ad486ccb94f2f5a3b9dd (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 27 ++++++++ contrib/toolbar.lisp | 155 +++++++++++++++++++++++++++++++++++++------ src/clfswm-menu.lisp | 65 ++++++++++-------- src/clfswm-second-mode.lisp | 1 + src/clfswm-util.lisp | 36 +++++++--- src/clfswm.lisp | 1 + src/config.lisp | 12 +++- src/tools.lisp | 126 ++++++++++++++++++++++++++++++++++- src/xlib-util.lisp | 5 +- 9 files changed, 363 insertions(+), 65 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Thu Aug 16 20:44:25 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Thu, 16 Aug 2012 13:44:25 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-87-g54755d7 Message-ID: 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, test has been updated via 54755d729577bffeaada06bb44a1475f2ec8614b (commit) from 788919822efa6da4598159b4da3cc3d479f9de80 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 2 + contrib/toolbar.lisp | 14 ++++--- src/tools.lisp | 111 +++++++++++++++++++++++++++++++------------------- 3 files changed, 79 insertions(+), 48 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Thu Aug 16 21:46:48 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Thu, 16 Aug 2012 14:46:48 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-88-g7aa1f3b Message-ID: 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 7aa1f3b3ed8aa85c25df4cf1544ab6b1d5e7fce1 (commit) from 54755d729577bffeaada06bb44a1475f2ec8614b (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 1 + src/tools.lisp | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Thu Aug 16 21:46:48 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Thu, 16 Aug 2012 14:46:48 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-88-g7aa1f3b Message-ID: 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, test has been updated via 7aa1f3b3ed8aa85c25df4cf1544ab6b1d5e7fce1 (commit) from 54755d729577bffeaada06bb44a1475f2ec8614b (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 1 + src/tools.lisp | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Sat Aug 18 20:21:09 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sat, 18 Aug 2012 13:21:09 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-89-ga59dbdb Message-ID: 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 a59dbdb22aa6c185199d094255a72a125ab9a11a (commit) from 7aa1f3b3ed8aa85c25df4cf1544ab6b1d5e7fce1 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++ contrib/toolbar.lisp | 84 +++++++++++++++++++++++++++++++++++++------------- 2 files changed, 67 insertions(+), 22 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Sat Aug 18 20:21:09 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sat, 18 Aug 2012 13:21:09 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-89-ga59dbdb Message-ID: 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, test has been updated via a59dbdb22aa6c185199d094255a72a125ab9a11a (commit) from 7aa1f3b3ed8aa85c25df4cf1544ab6b1d5e7fce1 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++ contrib/toolbar.lisp | 84 +++++++++++++++++++++++++++++++++++++------------- 2 files changed, 67 insertions(+), 22 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Sun Aug 19 20:55:16 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sun, 19 Aug 2012 13:55:16 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-90-g9161892 Message-ID: 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 91618927d50d0afb934acb1668aea3db66245d39 (commit) from a59dbdb22aa6c185199d094255a72a125ab9a11a (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 4 ++ contrib/toolbar.lisp | 139 ++++++++++++++++++++++++++++++-------------------- src/xlib-util.lisp | 13 +++-- 3 files changed, 96 insertions(+), 60 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Sun Aug 19 20:55:17 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sun, 19 Aug 2012 13:55:17 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-90-g9161892 Message-ID: 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, test has been updated via 91618927d50d0afb934acb1668aea3db66245d39 (commit) from a59dbdb22aa6c185199d094255a72a125ab9a11a (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 4 ++ contrib/toolbar.lisp | 139 ++++++++++++++++++++++++++++++-------------------- src/xlib-util.lisp | 13 +++-- 3 files changed, 96 insertions(+), 60 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Mon Aug 20 20:29:28 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Mon, 20 Aug 2012 13:29:28 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-91-gedc2c5f Message-ID: 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 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 + + * contrib/toolbar.lisp: Add an expose-mode-button-module. + 2012-08-19 Philippe Brochard * 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 From pbrochard at common-lisp.net Mon Aug 20 20:41:52 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Mon, 20 Aug 2012 13:41:52 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-92-g9ce22f4 Message-ID: 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 9ce22f406fd16ed0d4773c8c65e0367e9c84ecb2 (commit) from edc2c5fc5132d75d9e287e17c804bb6861a0bd82 (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 9ce22f406fd16ed0d4773c8c65e0367e9c84ecb2 Author: Philipp Kroos Date: Mon Aug 20 22:41:34 2012 +0200 src/clfswm-placement.lisp (here-placement): Evaluates to current position of pointer. diff --git a/ChangeLog b/ChangeLog index cc3d549..24f96c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2012-08-20 Philipp Kroos + * src/clfswm-placement.lisp (here-placement): Evaluates to current + position of pointer. + +2012-08-20 Philipp Kroos + * contrib/toolbar.lisp: Add an expose-mode-button-module. 2012-08-19 Philippe Brochard diff --git a/src/clfswm-placement.lisp b/src/clfswm-placement.lisp index c40901c..8e9b953 100644 --- a/src/clfswm-placement.lisp +++ b/src/clfswm-placement.lisp @@ -112,6 +112,15 @@ (values (- w width) (- h height) width height))) + +;;; +;;; Here placement: Evaluates to current position of pointer. +;;; +(defun here-placement (&optional (width 0) (height 0) (border-size *border-size*)) + (with-x-pointer + (values x y width height))) + + ;;; ;;; Current child placement ;;; ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ src/clfswm-placement.lisp | 9 +++++++++ 2 files changed, 14 insertions(+), 0 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Mon Aug 20 21:41:37 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Mon, 20 Aug 2012 14:41:37 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-93-g4f9b2e1 Message-ID: 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 4f9b2e14d10e1eb285f93d6bdea3054eebb33ce6 (commit) from 9ce22f406fd16ed0d4773c8c65e0367e9c84ecb2 (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 4f9b2e14d10e1eb285f93d6bdea3054eebb33ce6 Author: Philippe Brochard Date: Mon Aug 20 23:41:31 2012 +0200 src/clfswm-internal.lisp (add-in-never-managed-window-list): New function. diff --git a/AUTHORS b/AUTHORS index 4fb00f2..48d7119 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,7 +1,7 @@ CLFSWM - A(nother) Common Lisp FullScreen Window Manager --------------------------------------------------------- -Philippe Brochard pbrochard at common-lisp dot net test +Philippe Brochard pbrochard at common-lisp dot net Contributors @@ -11,7 +11,8 @@ Xavier Maillard xma at gnu dot org Cyrille THOUVENIN Desmond O. Chang Sylvain HENRY - +Ales Guzik +Philipp Kroos ----------------------------------- diff --git a/ChangeLog b/ChangeLog index 24f96c1..6191eb2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-08-20 Philippe Brochard + + * src/clfswm-internal.lisp (add-in-never-managed-window-list): New + function. + 2012-08-20 Philipp Kroos * src/clfswm-placement.lisp (here-placement): Evaluates to current diff --git a/contrib/toolbar.lisp b/contrib/toolbar.lisp index 3493eb0..f6441fe 100644 --- a/contrib/toolbar.lisp +++ b/contrib/toolbar.lisp @@ -378,7 +378,7 @@ :line-style :solid)) (push (toolbar-window toolbar) windows-list) (setf (window-transparency (toolbar-window toolbar)) *toolbar-window-transparency*) - (push (list #'is-toolbar-window-p nil) *never-managed-window-list*) + (add-in-never-managed-window-list (list 'is-toolbar-window-p nil)) (map-window (toolbar-window toolbar)) (raise-window (toolbar-window toolbar)) (refresh-toolbar toolbar) diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index fde6ef1..6277524 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -25,8 +25,6 @@ (in-package :clfswm) - - (defgeneric child-border-size (child)) (defmethod child-border-size ((child frame)) @@ -218,6 +216,9 @@ t)) +(defun add-in-never-managed-window-list (value) + (pushnew value *never-managed-window-list* :test #'equal)) + (defun never-managed-window-p (window) (when (xlib:window-p window) (dolist (type *never-managed-window-list*) diff --git a/src/clfswm-placement.lisp b/src/clfswm-placement.lisp index 8e9b953..4c558a1 100644 --- a/src/clfswm-placement.lisp +++ b/src/clfswm-placement.lisp @@ -117,6 +117,7 @@ ;;; Here placement: Evaluates to current position of pointer. ;;; (defun here-placement (&optional (width 0) (height 0) (border-size *border-size*)) + (declare (ignore border-size)) (with-x-pointer (values x y width height))) diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp index 6ac0742..d00877b 100644 --- a/src/clfswm-util.lisp +++ b/src/clfswm-util.lisp @@ -1764,7 +1764,7 @@ For window: set current child to window or its parent according to window-parent (setf (window-transparency window) *notify-window-transparency*) (when (frame-p (current-child)) (setf current-child (current-child))) - (push (list #'is-notify-window-p 'raise-window) *never-managed-window-list*) + (add-in-never-managed-window-list (list 'is-notify-window-p 'raise-window)) (map-window window) (refresh-notify-window) (xlib:display-finish-output *display*)))))) ----------------------------------------------------------------------- Summary of changes: AUTHORS | 5 +++-- ChangeLog | 5 +++++ contrib/toolbar.lisp | 2 +- src/clfswm-internal.lisp | 5 +++-- src/clfswm-placement.lisp | 1 + src/clfswm-util.lisp | 2 +- 6 files changed, 14 insertions(+), 6 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Mon Aug 20 21:43:07 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Mon, 20 Aug 2012 14:43:07 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-93-g4f9b2e1 Message-ID: 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, test has been updated via 4f9b2e14d10e1eb285f93d6bdea3054eebb33ce6 (commit) via 9ce22f406fd16ed0d4773c8c65e0367e9c84ecb2 (commit) 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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: AUTHORS | 5 ++- ChangeLog | 14 +++++++++ contrib/toolbar.lisp | 66 ++++++++++++++++++++++++++++---------------- src/clfswm-internal.lisp | 5 ++- src/clfswm-placement.lisp | 10 +++++++ src/clfswm-util.lisp | 2 +- 6 files changed, 73 insertions(+), 29 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Tue Aug 21 09:22:54 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Tue, 21 Aug 2012 02:22:54 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-95-gbcacf23 Message-ID: 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 bcacf236188d4e5580248173adedbbd328df2545 (commit) via 77139d314fe44369bc899046fd33138664026db4 (commit) from 4f9b2e14d10e1eb285f93d6bdea3054eebb33ce6 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 7 +++++++ contrib/reboot-halt.lisp | 16 ++++++++++++---- contrib/toolbar.lisp | 35 +++++++++++++++++++---------------- 3 files changed, 38 insertions(+), 20 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Tue Aug 21 09:22:54 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Tue, 21 Aug 2012 02:22:54 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-95-gbcacf23 Message-ID: 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, test has been updated via bcacf236188d4e5580248173adedbbd328df2545 (commit) via 77139d314fe44369bc899046fd33138664026db4 (commit) from 4f9b2e14d10e1eb285f93d6bdea3054eebb33ce6 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 7 +++++++ contrib/reboot-halt.lisp | 16 ++++++++++++---- contrib/toolbar.lisp | 35 +++++++++++++++++++---------------- 3 files changed, 38 insertions(+), 20 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Thu Aug 23 22:45:07 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Thu, 23 Aug 2012 15:45:07 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-96-ge4e26d1 Message-ID: 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, test has been updated via e4e26d1ac6055f1c14c81c674310716146ce07c5 (commit) from bcacf236188d4e5580248173adedbbd328df2545 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++ contrib/mpd.lisp | 83 ++++++++++++++++++++++++++++++++++++++++++------- contrib/toolbar.lisp | 33 ++++++++++++++++--- src/clfswm-info.lisp | 2 +- 4 files changed, 104 insertions(+), 19 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Thu Aug 23 22:45:06 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Thu, 23 Aug 2012 15:45:06 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-96-ge4e26d1 Message-ID: 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 e4e26d1ac6055f1c14c81c674310716146ce07c5 (commit) from bcacf236188d4e5580248173adedbbd328df2545 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++ contrib/mpd.lisp | 83 ++++++++++++++++++++++++++++++++++++++++++------- contrib/toolbar.lisp | 33 ++++++++++++++++--- src/clfswm-info.lisp | 2 +- 4 files changed, 104 insertions(+), 19 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Aug 24 21:07:27 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 24 Aug 2012 14:07:27 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-97-gfb27261 Message-ID: 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 fb272618b50bfc23423ff277e9d16e4d0d17f85a (commit) from e4e26d1ac6055f1c14c81c674310716146ce07c5 (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 fb272618b50bfc23423ff277e9d16e4d0d17f85a Author: Philippe Brochard Date: Fri Aug 24 23:07:21 2012 +0200 contrib/mpd.lisp: Add a small parameter for toolbar modules useful with vertical toolbars. diff --git a/ChangeLog b/ChangeLog index 73774cc..00fe7d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * contrib/mpd.lisp: New toolbar modules (available only if toolbar.lisp is loaded). + Add a small parameter for toolbar modules useful with vertical + toolbars. 2012-08-21 Philippe Brochard diff --git a/contrib/mpd.lisp b/contrib/mpd.lisp index 008324d..52cd03a 100644 --- a/contrib/mpd.lisp +++ b/contrib/mpd.lisp @@ -137,29 +137,35 @@ (define-toolbar-color mpd-info "MPD - Music Player Daemon information color") (define-toolbar-color mpd-buttons "MPD - Music Player Daemon buttons color") - (define-toolbar-module (mpd-info) - "MPD (Music Player Daemon) informations" + (define-toolbar-module (mpd-info small) + "(small) - MPD (Music Player Daemon) informations" (let* ((lines (do-shell "mpc" nil t)) (mpd-line (loop for line = (read-line lines nil nil) while line collect line))) (if (>= (length mpd-line) 3) - (toolbar-module-text toolbar module (tb-color mpd-info) - "~A - ~A" - (ensure-printable (first mpd-line)) - (ensure-printable (second mpd-line))) + (if small + (toolbar-module-text toolbar module (tb-color mpd-info) + "~A" + (ensure-printable (first mpd-line))) + (toolbar-module-text toolbar module (tb-color mpd-info) + "~A - ~A" + (ensure-printable (first mpd-line)) + (ensure-printable (second mpd-line)))) (toolbar-module-text toolbar module (tb-color mpd-info) "MPD - Not playing")))) - (define-toolbar-module (mpd-buttons) - "MPD (Music Player Daemon) buttons" + (define-toolbar-module (mpd-buttons small) + "(small) - MPD (Music Player Daemon) buttons" (with-set-toolbar-module-rectangle (module) (toolbar-module-text toolbar module (tb-color mpd-buttons) - "P N T < > C"))) + (if small + "PNT<>C" + "P N T < > C")))) - (define-toolbar-module-click (mpd-buttons) + (define-toolbar-module-click (mpd-buttons small) "P=Previous, N=Next, T=Toogle, <=seek-5% >=seek+5% C=start MPD client" - (declare (ignore state)) + (declare (ignore state small)) (when (= code 1) (let ((pos (toolbar-module-subdiv toolbar module root-x root-y 6))) (case pos ----------------------------------------------------------------------- Summary of changes: ChangeLog | 2 ++ contrib/mpd.lisp | 28 +++++++++++++++++----------- 2 files changed, 19 insertions(+), 11 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Aug 24 22:28:37 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 24 Aug 2012 15:28:37 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-98-gaccd190 Message-ID: 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 accd190438b0f42187b1524e21403d5887a0b296 (commit) from fb272618b50bfc23423ff277e9d16e4d0d17f85a (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 accd190438b0f42187b1524e21403d5887a0b296 Author: Philippe Brochard Date: Sat Aug 25 00:28:32 2012 +0200 contrib/volume-mode.lisp: Add mouse buttons actions in volume mode. Add a volume button toolbar module. diff --git a/ChangeLog b/ChangeLog index 00fe7d0..38a5ace 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-08-25 Philippe Brochard + + * contrib/volume-mode.lisp: Add mouse buttons actions in volume + mode. Add a volume button toolbar module. + 2012-08-24 Philippe Brochard * contrib/mpd.lisp: New toolbar modules (available only if diff --git a/contrib/volume-mode.lisp b/contrib/volume-mode.lisp index 3e925a5..c21770c 100644 --- a/contrib/volume-mode.lisp +++ b/contrib/volume-mode.lisp @@ -63,6 +63,8 @@ (format t "Loading Volume mode code... ") (defparameter *volume-keys* nil) +(defparameter *volume-mouse* nil) + (defconfig *volume-mode-placement* 'bottom-middle-root-placement 'Placement "Volume mode window placement") @@ -104,7 +106,10 @@ 'Volume-mode "Command to start an external mixer program") (define-init-hash-table-key *volume-keys* "Volume mode keys") +(define-init-hash-table-key *volume-mouse* "Volume mode mouse button") + (define-define-key "volume" *volume-keys*) +(define-define-mouse "volume-mouse" *volume-mouse*) (add-hook *binding-hook* 'init-*volume-keys*) @@ -128,6 +133,11 @@ (define-volume-key ("Escape") 'leave-volume-mode) (define-volume-key ("g" :control) 'leave-volume-mode) (define-volume-key ("e") 'run-external-volume-mixer) + (define-volume-mouse (1) 'leave-volume-mode) + (define-volume-mouse (2) 'run-external-volume-mixer) + (define-volume-mouse (3) 'volume-mute) + (define-volume-mouse (4) 'volume-raise) + (define-volume-mouse (5) 'volume-lower) ;;; Main mode (define-main-key ("XF86AudioMute") 'volume-mute) (define-main-key ("XF86AudioLowerVolume") 'volume-lower) @@ -159,8 +169,9 @@ text)) (copy-pixmap-buffer *volume-window* *volume-gc*)) -(defun leave-volume-mode () +(defun leave-volume-mode (&optional window root-x root-y) "Leave the volume mode" + (declare (ignore window root-x root-y)) (throw 'exit-volume-loop nil)) (defun update-volume-mode () @@ -221,6 +232,10 @@ (define-handler volume-mode :key-press (code state) (funcall-key-from-code *volume-keys* code state)) +(define-handler volume-mode :button-press (code state window root-x root-y) + (funcall-button-from-code *volume-mouse* code state window root-x root-y *fun-press*)) + + (defun volume-mode () (let ((grab-keyboard-p (xgrab-keyboard-p)) (grab-pointer-p (xgrab-pointer-p))) @@ -251,20 +266,44 @@ (defvar *volume-lower-function* nil) (defvar *volume-raise-function* nil) -(defun volume-mute () +(defun volume-mute (&optional window root-x root-y) "Toggle mute." + (declare (ignore window root-x root-y)) (volume-set *volume-mute-function*)) -(defun volume-lower () +(defun volume-lower (&optional window root-x root-y) "Lower volume." + (declare (ignore window root-x root-y)) (volume-set *volume-lower-function*)) -(defun volume-raise () +(defun volume-raise (&optional window root-x root-y) "Raise volume." + (declare (ignore window root-x root-y)) (volume-set *volume-raise-function*)) -(defun run-external-volume-mixer () +(defun run-external-volume-mixer (&optional window root-x root-y) "Start an external volume mixer" + (declare (ignore window root-x root-y)) (do-shell *volume-external-mixer-cmd*)) + +#+:clfswm-toolbar +(progn + (define-toolbar-color volume-mode-button "Volume mode color") + + (define-toolbar-module (volume-mode-button (text "Vol")) + "Volume mode button" + (with-set-toolbar-module-rectangle (module) + (toolbar-module-text toolbar module (tb-color volume-mode-button) text))) + + (define-toolbar-module-click (volume-mode-button text) + "Volume mode" + (declare (ignore text module)) + (if *in-volume-mode* + (funcall-button-from-code *volume-mouse* code state (toolbar-window toolbar) + root-x root-y *fun-press*) + (volume-mode)))) + + + (format t "done~%") ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 ++++ contrib/volume-mode.lisp | 49 +++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 49 insertions(+), 5 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Tue Aug 28 11:48:55 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Tue, 28 Aug 2012 04:48:55 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-100-g3361fc5 Message-ID: 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 3361fc5e9d0f69151d7e444ca4a54df13ccda2d6 (commit) via 12d85320bdcc73ad19dfb51ffcd4402a9f223003 (commit) from accd190438b0f42187b1524e21403d5887a0b296 (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 3361fc5e9d0f69151d7e444ca4a54df13ccda2d6 Author: Philippe Brochard Date: Tue Aug 28 13:48:49 2012 +0200 src/clfswm-expose-mode.lisp (expose-query-key-press-hook): Add an option to immediately select child if they can be directly accessed. diff --git a/ChangeLog b/ChangeLog index 38a5ace..bdcf7fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-08-28 Philippe Brochard + + * src/clfswm-expose-mode.lisp (expose-query-key-press-hook): Add + an option to immediately select child if they can be directly + accessed. + 2012-08-25 Philippe Brochard * contrib/volume-mode.lisp: Add mouse buttons actions in volume diff --git a/src/clfswm-expose-mode.lisp b/src/clfswm-expose-mode.lisp index 1ec4179..c6422bd 100644 --- a/src/clfswm-expose-mode.lisp +++ b/src/clfswm-expose-mode.lisp @@ -103,7 +103,9 @@ (defun expose-query-key-press-hook (code state) (declare (ignore code state)) - (expose-draw-letter)) + (expose-draw-letter) + (when (and *expose-direct-select* (<= (length *expose-windows-list*) 26)) + (leave-query-mode :return))) (defun expose-query-button-press-hook (code state x y) (declare (ignore state)) diff --git a/src/config.lisp b/src/config.lisp index 7fdd999..261571a 100644 --- a/src/config.lisp +++ b/src/config.lisp @@ -334,7 +334,8 @@ on the root window in the main mode with the mouse") 'Expose-mode "Show the window title on accel window") (defconfig *expose-transparency* 0.9 'Expose-mode "Expose string window background transparency") - +(defconfig *expose-direct-select* t + 'Expose-mode "Immediately select child if they can be directly accessed") ;;; CONFIG - Show key binding colors commit 12d85320bdcc73ad19dfb51ffcd4402a9f223003 Author: Philippe Brochard Date: Tue Aug 28 13:38:41 2012 +0200 src/*.lisp: Use with-xlib-protect macro to prevent a not implemented event x-error diff --git a/contrib/volume-mode.lisp b/contrib/volume-mode.lisp index c21770c..cffc420 100644 --- a/contrib/volume-mode.lisp +++ b/contrib/volume-mode.lisp @@ -199,7 +199,7 @@ :border (when (plusp *volume-border-size*) (get-color *volume-border*)) :colormap (xlib:screen-default-colormap *screen*) - :event-mask '(:exposure :key-press)) + :event-mask '(:exposure :key-press :button-press)) *volume-gc* (xlib:create-gcontext :drawable *volume-window* :foreground (get-color *volume-foreground*) :background (get-color *volume-background*) @@ -243,17 +243,18 @@ (unless grab-keyboard-p (ungrab-main-keys) (xgrab-keyboard *root*)) - (generic-mode 'volume-mode 'exit-volume-loop - :enter-function 'volume-enter-function - :loop-function 'volume-loop-function - :leave-function 'volume-leave-function - :original-mode '(main-mode)) - (unless grab-keyboard-p - (xungrab-keyboard) - (grab-main-keys)) - (if grab-pointer-p - (xgrab-pointer *root* 66 67) - (xungrab-pointer)))) + (unwind-protect + (generic-mode 'volume-mode 'exit-volume-loop + :enter-function 'volume-enter-function + :loop-function 'volume-loop-function + :leave-function 'volume-leave-function + :original-mode '(main-mode)) + (unless grab-keyboard-p + (xungrab-keyboard) + (grab-main-keys)) + (if grab-pointer-p + (xgrab-pointer *root* 66 67) + (xungrab-pointer))))) (defun volume-set (fn) (when fn diff --git a/src/clfswm-generic-mode.lisp b/src/clfswm-generic-mode.lisp index c7eab3f..c8f3978 100644 --- a/src/clfswm-generic-mode.lisp +++ b/src/clfswm-generic-mode.lisp @@ -25,27 +25,29 @@ (in-package :clfswm) - (defun generic-mode (mode exit-tag &key enter-function loop-function leave-function - (loop-hook *loop-hook*) original-mode) + (loop-hook *loop-hook*) original-mode) "Enter in a generic mode" (let ((last-mode *current-event-mode*)) (unassoc-keyword-handle-event) (when original-mode (dolist (add-mode (ensure-list original-mode)) - (assoc-keyword-handle-event add-mode))) + (assoc-keyword-handle-event add-mode))) (assoc-keyword-handle-event mode) (nfuncall enter-function) (catch exit-tag (unwind-protect - (loop - (call-hook loop-hook) - (process-timers) - (nfuncall loop-function) - (when (xlib:event-listen *display* *loop-timeout*) - (xlib:process-event *display* :handler #'handle-event)) - (xlib:display-finish-output *display*)) - (nfuncall leave-function) - (unassoc-keyword-handle-event) - (assoc-keyword-handle-event last-mode))))) + (loop + (with-xlib-protect (:generic-mode exit-tag) + (call-hook loop-hook) + (process-timers) + (nfuncall loop-function) + (when (xlib:event-listen *display* *loop-timeout*) + (xlib:process-event *display* :handler #'handle-event)) + (xlib:display-finish-output *display*))) + (progn + (nfuncall leave-function) + (unassoc-keyword-handle-event) + (assoc-keyword-handle-event last-mode)))))) + diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp index d00877b..794b506 100644 --- a/src/clfswm-util.lisp +++ b/src/clfswm-util.lisp @@ -549,12 +549,14 @@ (force-output) (unwind-protect (loop until done do - (when (xlib:event-listen *display* *loop-timeout*) - (xlib:process-event *display* :handler #'handle-identify)) - (xlib:display-finish-output *display*)) - (xlib:destroy-window window) - (xlib:close-font font) - (xgrab-pointer *root* 66 67))))) + (with-xlib-protect (:Identify-Loop nil) + (when (xlib:event-listen *display* *loop-timeout*) + (xlib:process-event *display* :handler #'handle-identify)) + (xlib:display-finish-output *display*))) + (progn + (xlib:destroy-window window) + (xlib:close-font font) + (xgrab-pointer *root* 66 67)))))) diff --git a/src/clfswm.lisp b/src/clfswm.lisp index f8429ce..0529b02 100644 --- a/src/clfswm.lisp +++ b/src/clfswm.lisp @@ -157,9 +157,10 @@ (defun main-loop () (loop - (call-hook *loop-hook*) - (process-timers) - (with-xlib-protect () + (with-xlib-protect (:main-loop nil) + (call-hook *loop-hook*) + (process-timers) + ;;(with-xlib-protect () (when (xlib:event-listen *display* *loop-timeout*) (xlib:process-event *display* :handler #'handle-event)) (xlib:display-finish-output *display*)))) @@ -289,15 +290,16 @@ (catch 'exit-main-loop (unwind-protect (main-loop) - (ungrab-main-keys) - (xlib:destroy-window *no-focus-window*) - (xlib:free-pixmap *pixmap-buffer*) - (destroy-all-frames-window) - (call-hook *close-hook*) - (clear-event-hooks) - (xlib:close-display *display*) - #+:event-debug - (format t "~2&Unhandled events: ~A~%" *unhandled-events*)))) + (progn + (ungrab-main-keys) + (xlib:destroy-window *no-focus-window*) + (xlib:free-pixmap *pixmap-buffer*) + (destroy-all-frames-window) + (call-hook *close-hook*) + (clear-event-hooks) + (xlib:close-display *display*) + #+:event-debug + (format t "~2&Unhandled events: ~A~%" *unhandled-events*))))) diff --git a/src/xlib-util.lisp b/src/xlib-util.lisp index b5e1699..2e0573f 100644 --- a/src/xlib-util.lisp +++ b/src/xlib-util.lisp @@ -65,17 +65,37 @@ Window types are in +WINDOW-TYPES+.") "Alist mapping NETWM window types to keywords.") -(defmacro with-xlib-protect (() &body body) +;;(defmacro with-xlib-protect (() &body body) +;; "Prevent Xlib errors" +;; `(handler-case +;; (with-simple-restart (top-level "Return to clfswm's top level") +;; , at body) +;; ((or xlib:match-error xlib:window-error xlib:drawable-error xlib:lookup-error) (c) +;; (progn +;; (format t "Ignoring XLib error: ~S~%" c) +;; (unassoc-keyword-handle-event) +;; (assoc-keyword-handle-event 'main-mode) +;; (setf *in-second-mode* nil))))) + + +(defmacro with-xlib-protect ((&optional name tag) &body body) "Prevent Xlib errors" `(handler-case (with-simple-restart (top-level "Return to clfswm's top level") , at body) - ((or xlib:match-error xlib:window-error xlib:drawable-error xlib:lookup-error) (c) - (progn - (format t "Ignoring XLib error: ~S~%" c) - (unassoc-keyword-handle-event) - (assoc-keyword-handle-event 'main-mode) - (setf *in-second-mode* nil))))) + (xlib::x-error (c) + (declare (ignore c)) + (if ,tag + (format t "~A ~A~%" ,name ,tag) + (format t "~A ~A~%" ,name ',body)) + (force-output)))) + +;; (format t "Ignoring XLib error: ~S~%" c)))) +;; (funcall 'exit-generic-mode)))) +;; (unassoc-keyword-handle-event) +;; (assoc-keyword-handle-event 'main-mode) +;; (setf *in-second-mode* nil)))) + (defmacro with-x-pointer (&body body) @@ -169,7 +189,8 @@ Expand in handle-event-fun-main-mode-key-press" `(defun ,(keyword->handle-event mode keyword) (&rest event-slots &key #+:event-debug event-key , at args &allow-other-keys) (declare (ignorable event-slots)) #+:event-debug (print (list *current-event-mode* event-key)) - , at body)) + (with-xlib-protect (:define-handler (list ',mode ,keyword)) + , at body))) (defun event-hook-name (event-keyword) @@ -217,9 +238,11 @@ Expand in handle-event-fun-main-mode-key-press" `(let ((,event-fun (lambda (&rest event-slots &key #+:event-debug event-key , at args &allow-other-keys) (declare (ignorable event-slots)) #+:event-debug (print (list ,event-keyword event-key)) - , at body))) + (with-xlib-protect (:define-event-hook ,event-keyword) + , at body)))) (add-event-hook ,event-keyword ,event-fun) - ,event-fun))) + (with-xlib-protect (:define-event-hook-2 ,event-keyword) + ,event-fun)))) (defmacro event-defun (name args &body body) @@ -249,18 +272,20 @@ they should be windows. So use this function to make a window out of them." #+(or sbcl ecl openmcl) (xlib::make-window :id (slot-value xobject 'xlib::id) :display *display*) #-(or sbcl clisp ecl openmcl) (error 'not-implemented))) - (with-xlib-protect () + (with-xlib-protect (:handle-event event-key) (catch 'exit-handle-event (let ((win (getf event-slots :window))) (when (and win (not (xlib:window-p win))) (dbg "Pixmap Workaround! Should be a window: " win) (setf (getf event-slots :window) (make-xlib-window win)))) - (let ((hook-symbol (event-hook-name event-key))) - (when (boundp hook-symbol) - (apply #'call-hook (symbol-value hook-symbol) event-slots))) - (if (fboundp event-key) - (apply event-key event-slots) - #+:event-debug (pushnew (list *current-event-mode* event-key) *unhandled-events* :test #'equal))) + (with-xlib-protect (:handle-event-2 event-key) + (let ((hook-symbol (event-hook-name event-key))) + (when (boundp hook-symbol) + (apply #'call-hook (symbol-value hook-symbol) event-slots)))) + (with-xlib-protect (:handle-event-3 event-key) + (if (fboundp event-key) + (apply event-key event-slots) + #+:event-debug (pushnew (list *current-event-mode* event-key) *unhandled-events* :test #'equal)))) (xlib:display-finish-output *display*)) t)) @@ -838,11 +863,12 @@ they should be windows. So use this function to make a window out of them." (unwind-protect (progn , at body) - (if pointer-grabbed - (xgrab-pointer *root* ,old-cursor ,old-mask) - (xungrab-pointer)) - (unless keyboard-grabbed - (xungrab-keyboard))))) + (progn + (if pointer-grabbed + (xgrab-pointer *root* ,old-cursor ,old-mask) + (xungrab-pointer)) + (unless keyboard-grabbed + (xungrab-keyboard)))))) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 6 +++ contrib/volume-mode.lisp | 25 ++++++++------- src/clfswm-expose-mode.lisp | 4 ++- src/clfswm-generic-mode.lisp | 28 +++++++++-------- src/clfswm-util.lisp | 14 +++++--- src/clfswm.lisp | 26 ++++++++------- src/config.lisp | 3 +- src/xlib-util.lisp | 70 ++++++++++++++++++++++++++++------------- 8 files changed, 109 insertions(+), 67 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Tue Aug 28 11:49:23 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Tue, 28 Aug 2012 04:49:23 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-100-g3361fc5 Message-ID: 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, test has been updated via 3361fc5e9d0f69151d7e444ca4a54df13ccda2d6 (commit) via 12d85320bdcc73ad19dfb51ffcd4402a9f223003 (commit) via accd190438b0f42187b1524e21403d5887a0b296 (commit) via fb272618b50bfc23423ff277e9d16e4d0d17f85a (commit) from e4e26d1ac6055f1c14c81c674310716146ce07c5 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 13 +++++++ contrib/mpd.lisp | 28 +++++++++------ contrib/volume-mode.lisp | 74 ++++++++++++++++++++++++++++++++--------- src/clfswm-expose-mode.lisp | 4 ++- src/clfswm-generic-mode.lisp | 28 ++++++++------- src/clfswm-util.lisp | 14 ++++--- src/clfswm.lisp | 26 ++++++++------- src/config.lisp | 3 +- src/xlib-util.lisp | 70 +++++++++++++++++++++++++++------------ 9 files changed, 177 insertions(+), 83 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Aug 31 12:42:08 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 31 Aug 2012 05:42:08 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-101-g02dc1b1 Message-ID: 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 02dc1b12ef9eb955c29d45f108d836a3a3dc206a (commit) from 3361fc5e9d0f69151d7e444ca4a54df13ccda2d6 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 ++ contrib/amixer.lisp | 2 +- contrib/toolbar.lisp | 32 ++++++----- contrib/volume-mode.lisp | 35 ++++------- src/clfswm-circulate-mode.lisp | 21 ++----- src/clfswm-generic-mode.lisp | 42 +++++++------- src/clfswm-info.lisp | 23 ++----- src/clfswm-query.lisp | 23 ++------ src/clfswm-second-mode.lisp | 16 ++++-- src/clfswm.lisp | 1 - src/package.lisp | 2 + src/xlib-util.lisp | 121 +++++++++++++++++++-------------------- 12 files changed, 149 insertions(+), 174 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Aug 31 12:42:08 2012 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 31 Aug 2012 05:42:08 -0700 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch test updated. R-1106-101-g02dc1b1 Message-ID: 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, test has been updated via 02dc1b12ef9eb955c29d45f108d836a3a3dc206a (commit) from 3361fc5e9d0f69151d7e444ca4a54df13ccda2d6 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 ++ contrib/amixer.lisp | 2 +- contrib/toolbar.lisp | 32 ++++++----- contrib/volume-mode.lisp | 35 ++++------- src/clfswm-circulate-mode.lisp | 21 ++----- src/clfswm-generic-mode.lisp | 42 +++++++------- src/clfswm-info.lisp | 23 ++----- src/clfswm-query.lisp | 23 ++------ src/clfswm-second-mode.lisp | 16 ++++-- src/clfswm.lisp | 1 - src/package.lisp | 2 + src/xlib-util.lisp | 121 +++++++++++++++++++-------------------- 12 files changed, 149 insertions(+), 174 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager