From pbrochard at common-lisp.net Fri Dec 13 21:02:11 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 13 Dec 2013 13:02:11 -0800 (PST) Subject: [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-52-g0e82d82 Message-ID: <20131213210211.A4C23356491@mail.common-lisp.net> 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 0e82d8207d00a3d4cfc55a439d9cd01768ad6a90 (commit) from 51f9f1574d42c723e55577fbc4a5f858e2af1d14 (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 0e82d8207d00a3d4cfc55a439d9cd01768ad6a90 Author: Philippe Brochard Date: Fri Dec 13 22:02:08 2013 +0100 Associate child under mouse to expose-child diff --git a/src/clfswm-expose-mode.lisp b/src/clfswm-expose-mode.lisp index 31fbee1..50f36ef 100644 --- a/src/clfswm-expose-mode.lisp +++ b/src/clfswm-expose-mode.lisp @@ -133,7 +133,8 @@ (defun expose-query-button-press-hook (code state x y) (declare (ignore state)) (when (= code 1) - (setf *expose-selected-child* (find-child-under-mouse x y))) + (setf *expose-selected-child* + (find (find-child-under-mouse x y) *expose-child-list* :test #'child-equal-p :key #'expose-child-child))) (leave-query-mode :click)) ----------------------------------------------------------------------- Summary of changes: src/clfswm-expose-mode.lisp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Dec 6 20:04:03 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 6 Dec 2013 12:04:03 -0800 (PST) Subject: [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-50-g544f93c Message-ID: <20131206200403.1C7D5356691@mail.common-lisp.net> 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 544f93c4df12c31b343f7e60bdbba40a8041b361 (commit) from cc7b5ea960ee6511b6d66c38eb0bf3c6f799de96 (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 544f93c4df12c31b343f7e60bdbba40a8041b361 Author: Philippe Brochard Date: Fri Dec 6 21:03:55 2013 +0100 Add some necessary ensure-printable protection diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index 19af51c..b322c38 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -239,7 +239,7 @@ (defgeneric child-name (child)) (defmethod child-name ((child xlib:window)) - (xlib:wm-name child)) + (ensure-printable (xlib:wm-name child))) (defmethod child-name ((child frame)) (frame-name child)) @@ -268,12 +268,14 @@ (defgeneric child-fullname (child)) (defmethod child-fullname ((child xlib:window)) - (format nil "~A (~A)" (or (xlib:wm-name child) "?") (or (xlib:get-wm-class child) "?"))) + (ensure-printable + (format nil "~A (~A)" (or (xlib:wm-name child) "?") (or (xlib:get-wm-class child) "?")))) (defmethod child-fullname ((child frame)) - (aif (frame-name child) - (format nil "~A (Frame ~A)" it (frame-number child)) - (format nil "Frame ~A" (frame-number child)))) + (ensure-printable + (aif (frame-name child) + (format nil "~A (Frame ~A)" it (frame-number child)) + (format nil "Frame ~A" (frame-number child))))) (defmethod child-fullname (child) (declare (ignore child)) diff --git a/src/clfswm-query.lisp b/src/clfswm-query.lisp index 0181374..d7a14cd 100644 --- a/src/clfswm-query.lisp +++ b/src/clfswm-query.lisp @@ -41,12 +41,13 @@ (defun add-char-in-query-string (char) - (setf *query-string* (concatenate 'string - (when (<= *query-pos* (length *query-string*)) - (subseq *query-string* 0 *query-pos*)) - (string char) - (when (< *query-pos* (length *query-string*)) - (subseq *query-string* *query-pos*)))) + (setf *query-string* (ensure-printable + (concatenate 'string + (when (<= *query-pos* (length *query-string*)) + (subseq *query-string* 0 *query-pos*)) + (string char) + (when (< *query-pos* (length *query-string*)) + (subseq *query-string* *query-pos*))))) (incf *query-pos*)) ----------------------------------------------------------------------- Summary of changes: src/clfswm-internal.lisp | 12 +++++++----- src/clfswm-query.lisp | 13 +++++++------ 2 files changed, 14 insertions(+), 11 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Dec 13 22:28:50 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 13 Dec 2013 14:28:50 -0800 (PST) Subject: [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-55-g2ee0a21 Message-ID: <20131213222850.46BA6356491@mail.common-lisp.net> 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 2ee0a21f395a006b88f476c4ff5202b329bfd8fb (commit) from 35913a8b7f8f95c1b912e02c56fa16191eae2d5a (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 2ee0a21f395a006b88f476c4ff5202b329bfd8fb Author: Renaud Casenave-Pere Date: Fri Dec 13 23:28:33 2013 +0100 Do not steal the focus on focus-in diff --git a/src/clfswm.lisp b/src/clfswm.lisp index 3b6545a..0853644 100644 --- a/src/clfswm.lisp +++ b/src/clfswm.lisp @@ -130,6 +130,14 @@ (manage-focus window root-x root-y))) +(define-handler main-mode :focus-in (window) + (unless (child-equal-p window (focused-window)) + (set-focus-to-current-child))) + + + + + (define-handler main-mode :exposure (window) (awhen (find-frame-window window) (display-frame-info it))) diff --git a/src/xlib-util.lisp b/src/xlib-util.lisp index dbe4c2a..8dae671 100644 --- a/src/xlib-util.lisp +++ b/src/xlib-util.lisp @@ -570,15 +570,23 @@ they should be windows. So use this function to make a window out of them." (setf (xlib:window-priority window) :above))) -(defun no-focus () - "don't focus any window but still read keyboard events." - (xlib:set-input-focus *display* *no-focus-window* :pointer-root)) +(let ((focused-window nil)) + (defun no-focus () + "don't focus any window but still read keyboard events." + (xlib:set-input-focus *display* *no-focus-window* :pointer-root) + (setf focused-window nil)) + + (defun focus-window (window) + "Give the window focus." + (no-focus) + (when (xlib:window-p window) + (xlib:set-input-focus *display* window :parent) + (setf focused-window window))) + + (defun focused-window () + focused-window)) + -(defun focus-window (window) - "Give the window focus." - (no-focus) - (when (xlib:window-p window) - (xlib:set-input-focus *display* window :parent))) (defun raise-and-focus-window (window) "Raise and focus." ----------------------------------------------------------------------- Summary of changes: src/clfswm.lisp | 8 ++++++++ src/xlib-util.lisp | 24 ++++++++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Wed Dec 4 14:44:18 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Wed, 4 Dec 2013 06:44:18 -0800 (PST) Subject: [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-49-gcc7b5ea Message-ID: <20131204144418.536323565F1@mail.common-lisp.net> 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 cc7b5ea960ee6511b6d66c38eb0bf3c6f799de96 (commit) from af50cfac18c33eb78d6730ed8d408db7598c4033 (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 cc7b5ea960ee6511b6d66c38eb0bf3c6f799de96 Author: Philippe Brochard Date: Wed Dec 4 15:44:14 2013 +0100 Load clfswm.asd from load.lisp diff --git a/load.lisp b/load.lisp index b0938fd..16dd581 100644 --- a/load.lisp +++ b/load.lisp @@ -136,6 +136,7 @@ from $XDG_CONFIG_HOME/clfswm/clfswmrc") #+:clfswm-compile (progn (load-info "Compiling CLFSWM") + (load "clfswm.asd") (asdf:oos 'asdf:load-op :clfswm)) ----------------------------------------------------------------------- Summary of changes: load.lisp | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Dec 13 20:53:35 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 13 Dec 2013 12:53:35 -0800 (PST) Subject: [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-51-g51f9f15 Message-ID: <20131213205335.70C79356491@mail.common-lisp.net> 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 51f9f1574d42c723e55577fbc4a5f858e2af1d14 (commit) from 544f93c4df12c31b343f7e60bdbba40a8041b361 (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 51f9f1574d42c723e55577fbc4a5f858e2af1d14 Author: Philippe Brochard Date: Fri Dec 13 21:52:35 2013 +0100 Set expose windows and gcontexts to nil when done in expose-mode diff --git a/src/clfswm-expose-mode.lisp b/src/clfswm-expose-mode.lisp index 22c52f8..31fbee1 100644 --- a/src/clfswm-expose-mode.lisp +++ b/src/clfswm-expose-mode.lisp @@ -88,6 +88,7 @@ (expose-child-string ex-child)) (copy-pixmap-buffer window gc))))) + (defun expose-create-window (ex-child) (let ((child (expose-child-child ex-child))) (with-current-child (child) @@ -182,8 +183,8 @@ (multiple-value-bind (letters return) (query-string "Which child ?") (let ((ex-child (case return - (:return (expose-find-child-from-letters letters)) - (:click *expose-selected-child*)))) + (:return (expose-find-child-from-letters letters)) + (:click *expose-selected-child*)))) (when ex-child (expose-child-child ex-child)))))) @@ -195,7 +196,9 @@ (awhen (expose-child-gc ex-child) (xlib:free-gcontext it)) (awhen (expose-child-window ex-child) - (xlib:destroy-window it))) + (xlib:destroy-window it)) + (setf (expose-child-gc ex-child) nil + (expose-child-window ex-child) nil)) (when *expose-font* (xlib:close-font *expose-font*)) (expose-unpresent-windows)) diff --git a/src/clfswm-fastswitch-mode.lisp b/src/clfswm-fastswitch-mode.lisp index 310cb89..39c1b5d 100644 --- a/src/clfswm-fastswitch-mode.lisp +++ b/src/clfswm-fastswitch-mode.lisp @@ -61,7 +61,7 @@ (xlib:draw-glyphs *pixmap-buffer* *fastswitch-gc* (* (xlib:max-char-width *fastswitch-font*) posx) placey - (child-fullname (expose-child-child ex-child))) + (ensure-printable (child-fullname (expose-child-child ex-child)))) (incf posx (1+ (length (child-fullname (expose-child-child ex-child)))))) posx)) diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index b322c38..01807cf 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -252,10 +252,10 @@ (defgeneric set-child-name (child name)) (defmethod set-child-name ((child xlib:window) name) - (setf (xlib:wm-name child) name)) + (setf (xlib:wm-name child) (ensure-printable name))) (defmethod set-child-name ((child frame) name) - (setf (frame-name child) name)) + (setf (frame-name child) (ensure-printable name))) (defmethod set-child-name (child name) (declare (ignore child name))) @@ -268,14 +268,12 @@ (defgeneric child-fullname (child)) (defmethod child-fullname ((child xlib:window)) - (ensure-printable - (format nil "~A (~A)" (or (xlib:wm-name child) "?") (or (xlib:get-wm-class child) "?")))) + (format nil "~A (~A)" (or (xlib:wm-name child) "?") (or (xlib:get-wm-class child) "?"))) (defmethod child-fullname ((child frame)) - (ensure-printable - (aif (frame-name child) - (format nil "~A (Frame ~A)" it (frame-number child)) - (format nil "Frame ~A" (frame-number child))))) + (aif (frame-name child) + (format nil "~A (Frame ~A)" it (frame-number child)) + (format nil "Frame ~A" (frame-number child)))) (defmethod child-fullname (child) (declare (ignore child)) diff --git a/src/xlib-util.lisp b/src/xlib-util.lisp index 5d8cb0f..dbe4c2a 100644 --- a/src/xlib-util.lisp +++ b/src/xlib-util.lisp @@ -1003,6 +1003,7 @@ they should be windows. So use this function to make a window out of them." t)))) + (defun copy-pixmap-buffer (window gc) (xlib:copy-area *pixmap-buffer* gc 0 0 (x-drawable-width window) (x-drawable-height window) ----------------------------------------------------------------------- Summary of changes: src/clfswm-expose-mode.lisp | 9 ++++++--- src/clfswm-fastswitch-mode.lisp | 2 +- src/clfswm-internal.lisp | 14 ++++++-------- src/xlib-util.lisp | 1 + 4 files changed, 14 insertions(+), 12 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Dec 13 21:52:00 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 13 Dec 2013 13:52:00 -0800 (PST) Subject: [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-54-g35913a8 Message-ID: <20131213215200.26893356491@mail.common-lisp.net> 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 35913a8b7f8f95c1b912e02c56fa16191eae2d5a (commit) from 78ce07dbd9b227bb6f1cea3146a9d467e2ef5f1d (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 35913a8b7f8f95c1b912e02c56fa16191eae2d5a Author: Philippe Brochard Date: Fri Dec 13 22:51:57 2013 +0100 Also remove frame in delete-child-and-children-in-all-frames diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index 01807cf..dc6f150 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -1567,7 +1567,10 @@ Warning:frame window and gc are freeed." (when (frame-p child) (delete-child-and-children-in-frames child *root-frame* close-methode)) (when (xlib:window-p child) - (funcall close-methode child)))) + (funcall close-methode child)) + (when (frame-p child) + (awhen (frame-gc child) (xlib:free-gcontext it) (setf it nil)) + (awhen (frame-window child) (xlib:destroy-window it) (setf it nil))))) (defun clean-windows-in-all-frames () diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp index 2acb2d3..f5cefac 100644 --- a/src/clfswm-util.lisp +++ b/src/clfswm-util.lisp @@ -671,7 +671,7 @@ Write (defparameter *contrib-dir* \"/usr/local/lib/clfswm/\") in ~A.~%" (child-root-p frame)) (when (child-equal-p frame (current-child)) (setf (current-child) (find-current-root))) - (remove-child-in-frame frame (find-parent-frame frame))) + (delete-child-and-children-in-all-frames frame)) (show-all-children t)) ----------------------------------------------------------------------- Summary of changes: src/clfswm-internal.lisp | 5 ++++- src/clfswm-util.lisp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Dec 13 21:17:21 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 13 Dec 2013 13:17:21 -0800 (PST) Subject: [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-53-g78ce07d Message-ID: <20131213211721.9DDC6356491@mail.common-lisp.net> 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 78ce07dbd9b227bb6f1cea3146a9d467e2ef5f1d (commit) from 0e82d8207d00a3d4cfc55a439d9cd01768ad6a90 (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 78ce07dbd9b227bb6f1cea3146a9d467e2ef5f1d Author: Micha?l Cadilhac Date: Fri Dec 13 22:16:42 2013 +0100 Leave/enter frames like in spatial move diff --git a/src/clfswm-circulate-mode.lisp b/src/clfswm-circulate-mode.lisp index 8f1a1bd..957684a 100644 --- a/src/clfswm-circulate-mode.lisp +++ b/src/clfswm-circulate-mode.lisp @@ -312,7 +312,10 @@ (defun reorder-brother-simple (reorder-fun) - (unless (child-root-p (current-child)) + (let ((is-root-p (child-root-p (current-child)))) + (when is-root-p + (leave-frame) + (sleep *spatial-move-delay-before*)) (no-focus) (select-current-frame nil) (let ((parent-frame (find-parent-frame (current-child)))) @@ -320,7 +323,10 @@ (with-slots (child) parent-frame (setf child (funcall reorder-fun child) (current-child) (frame-selected-child parent-frame)))) - (show-all-children t)))) + (show-all-children t) + (when is-root-p + (sleep *spatial-move-delay-after*) + (enter-frame))))) (defun select-next-brother-simple () ----------------------------------------------------------------------- Summary of changes: src/clfswm-circulate-mode.lisp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager