From pbrochard at common-lisp.net Sun Jan 6 14:32:30 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sun, 06 Jan 2013 06:32:30 -0800 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-7-g695078a 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 695078ae8c6aefd906594dfb8e5e2a3c97d562ad (commit) from 5b30659681be4b47f51d23638e8961d81fe43b76 (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 695078ae8c6aefd906594dfb8e5e2a3c97d562ad Author: Philippe Brochard Date: Sun Jan 6 15:32:23 2013 +0100 Add :maxsize windows in *default-managed-type* diff --git a/src/package.lisp b/src/package.lisp index c3c495b..1515fb2 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -109,7 +109,7 @@ It is particulary useful with CLISP/MIT-CLX.") ;;; CONFIG - Default managed window type for a frame ;;; type can be :all, :normal, :transient, :maxsize, :desktop, :dock, :toolbar, :menu, :utility, :splash, :dialog -(defconfig *default-managed-type* '(:normal) nil +(defconfig *default-managed-type* '(:normal :maxsize) nil "Default managed window types") ;;(defparameter *default-managed-type* '(:normal :maxsize :transient)) ;;(defparameter *default-managed-type* '(:normal :transient :maxsize :desktop :dock :toolbar :menu :utility :splash :dialog)) ----------------------------------------------------------------------- Summary of changes: src/package.lisp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Sun Jan 6 15:08:47 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sun, 06 Jan 2013 07:08:47 -0800 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-8-g6a451c6 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 6a451c65b93ea73212a9c216190a946d0e5c04fb (commit) from 695078ae8c6aefd906594dfb8e5e2a3c97d562ad (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 6a451c65b93ea73212a9c216190a946d0e5c04fb Author: Philippe Brochard Date: Sun Jan 6 16:08:41 2013 +0100 Set windows with max-size greater than root sizes to normal windows type diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index e543dc0..819a420 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -1062,7 +1062,7 @@ XINERAMA version 1.1 opcode: 150 (defgeneric set-child-stack-order (window child) - (:documentation "Raise window if child is NIL else put window just below child")) + (:documentation "Put window just below child")) (defmethod set-child-stack-order (window (child xlib:window)) (lower-window window child)) diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp index 8bc8b62..859ef9f 100644 --- a/src/clfswm-util.lisp +++ b/src/clfswm-util.lisp @@ -1201,12 +1201,13 @@ For window: set current child to window or its parent according to window-parent (defun display-current-window-info () "Display information on the current window" (with-current-window - (info-mode (list (format nil "Window: ~A" window) - (format nil "Window name: ~A" (xlib:wm-name window)) - (format nil "Window class: ~A" (xlib:get-wm-class window)) - (format nil "Window type: ~:(~A~)" (window-type window)) - (format nil "Window id: 0x~X" (xlib:window-id window)) - (format nil "Window transparency: ~A" (* 100 (window-transparency window)))))) + (info-mode (append (list (format nil "Window: ~A" window) + (format nil "Window name: ~A" (xlib:wm-name window)) + (format nil "Window class: ~A" (xlib:get-wm-class window)) + (format nil "Window type: ~:(~A~)" (window-type window)) + (format nil "Window id: 0x~X" (xlib:window-id window)) + (format nil "Window transparency: ~A" (* 100 (window-transparency window)))) + (split-string (format nil "~A" (xlib:wm-normal-hints window)) #\Newline)))) (leave-second-mode)) (defun set-current-window-transparency () diff --git a/src/package.lisp b/src/package.lisp index 1515fb2..c3c495b 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -109,7 +109,7 @@ It is particulary useful with CLISP/MIT-CLX.") ;;; CONFIG - Default managed window type for a frame ;;; type can be :all, :normal, :transient, :maxsize, :desktop, :dock, :toolbar, :menu, :utility, :splash, :dialog -(defconfig *default-managed-type* '(:normal :maxsize) nil +(defconfig *default-managed-type* '(:normal) nil "Default managed window types") ;;(defparameter *default-managed-type* '(:normal :maxsize :transient)) ;;(defparameter *default-managed-type* '(:normal :transient :maxsize :desktop :dock :toolbar :menu :utility :splash :dialog)) diff --git a/src/xlib-util.lisp b/src/xlib-util.lisp index dcb552f..97ff700 100644 --- a/src/xlib-util.lisp +++ b/src/xlib-util.lisp @@ -471,8 +471,10 @@ they should be windows. So use this function to make a window out of them." "Return one of :desktop, :dock, :toolbar, :utility, :splash, :dialog, :transient, :maxsize and :normal." (or (and (let ((hints (xlib:wm-normal-hints window))) - (and hints (or (xlib:wm-size-hints-max-width hints) - (xlib:wm-size-hints-max-height hints) + (and hints (or (and (xlib:wm-size-hints-max-width hints) + (< (xlib:wm-size-hints-max-width hints) (x-drawable-width *root*))) + (and (xlib:wm-size-hints-max-height hints) + (< (xlib:wm-size-hints-max-height hints) (x-drawable-height *root*))) (xlib:wm-size-hints-min-aspect hints) (xlib:wm-size-hints-max-aspect hints)))) :maxsize) ----------------------------------------------------------------------- Summary of changes: src/clfswm-internal.lisp | 2 +- src/clfswm-util.lisp | 13 +++++++------ src/package.lisp | 2 +- src/xlib-util.lisp | 6 ++++-- 4 files changed, 13 insertions(+), 10 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Thu Jan 10 08:53:50 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Thu, 10 Jan 2013 00:53:50 -0800 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-9-g2c2d14a 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 2c2d14a8691c1145d8ac4e151a73502b8880119f (commit) from 6a451c65b93ea73212a9c216190a946d0e5c04fb (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 2c2d14a8691c1145d8ac4e151a73502b8880119f Author: Philippe Brochard Date: Thu Jan 10 09:53:29 2013 +0100 Raise window only if there is no maxsize fullscreenned windows (ex: SDL windows in fullscreen mode) diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index 819a420..72240f3 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -1071,7 +1071,9 @@ XINERAMA version 1.1 opcode: 150 (lower-window window (frame-window child))) (defmethod set-child-stack-order (window child) - (declare (ignore window child))) + (declare (ignore child)) + (unless (maxmin-size-equal-window-in-tree) + (raise-window window))) diff --git a/src/xlib-util.lisp b/src/xlib-util.lisp index 97ff700..6210c6e 100644 --- a/src/xlib-util.lisp +++ b/src/xlib-util.lisp @@ -328,6 +328,31 @@ they should be windows. So use this function to make a window out of them." +(defun maxmin-size-equal-p (window) + (when (xlib:window-p window) + (let ((hints (xlib:wm-normal-hints window))) + (when hints + (let ((hint-x (xlib:wm-size-hints-x hints)) + (hint-y (xlib:wm-size-hints-y hints)) + (user-specified-position-p (xlib:wm-size-hints-user-specified-position-p hints)) + (min-width (xlib:wm-size-hints-min-width hints)) + (min-height (xlib:wm-size-hints-min-height hints)) + (max-width (xlib:wm-size-hints-max-width hints)) + (max-height (xlib:wm-size-hints-max-height hints))) + (and hint-x hint-y min-width max-width min-height max-height + user-specified-position-p + (= hint-x 0) (= hint-y 0) + (= min-width max-width) + (= min-height max-height))))))) + +(defun maxmin-size-equal-window-in-tree () + (dolist (win (xlib:query-tree *root*)) + (when (maxmin-size-equal-p win) + (return win)))) + + + + (defun window-state (win) "Get the state (iconic, normal, withdrawn) of a window." (first (xlib:get-property win :WM_STATE))) ----------------------------------------------------------------------- Summary of changes: src/clfswm-internal.lisp | 4 +++- src/xlib-util.lisp | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Thu Jan 10 10:18:36 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Thu, 10 Jan 2013 02:18:36 -0800 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-10-g53b3bd4 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 53b3bd4d5badf51a6f69f3fba27b1b21fde7ba85 (commit) from 2c2d14a8691c1145d8ac4e151a73502b8880119f (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 53b3bd4d5badf51a6f69f3fba27b1b21fde7ba85 Author: Philippe Brochard Date: Thu Jan 10 11:18:31 2013 +0100 Move child in its original parent if no destination child is found. Show all children before waiting the child move. diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp index 859ef9f..6ccabf1 100644 --- a/src/clfswm-util.lisp +++ b/src/clfswm-util.lisp @@ -1248,16 +1248,18 @@ For window: set current child to window or its parent according to window-parent (let ((child (find-child-under-mouse root-x root-y))) (unless (child-root-p child) (hide-all child) - (remove-child-in-frame child (find-parent-frame child)) - (wait-mouse-button-release 50 51) - (multiple-value-bind (x y) - (xlib:query-pointer *root*) - (let ((dest (find-child-under-mouse x y))) - (when (xlib:window-p dest) - (setf dest (find-parent-frame dest))) - (unless (child-equal-p child dest) - (move-child-to child dest) - (show-all-children)))))) + (let ((parent (find-parent-frame child))) + (remove-child-in-frame child parent) + (show-all-children) + (wait-mouse-button-release 50 51) + (multiple-value-bind (x y) + (xlib:query-pointer *root*) + (let ((dest (find-child-under-mouse x y))) + (when (xlib:window-p dest) + (setf dest (find-parent-frame dest))) + (unless (child-equal-p child dest) + (move-child-to child (or dest parent)))))) + (show-all-children))) (stop-button-event)) ----------------------------------------------------------------------- Summary of changes: src/clfswm-util.lisp | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Jan 11 22:43:07 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 11 Jan 2013 14:43:07 -0800 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-12-g4228289 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 42282897b00a750058ea2c2b8f9aad1303e23f25 (commit) via a1e53120e92c16241d88ffc661b41b251598aba3 (commit) from 53b3bd4d5badf51a6f69f3fba27b1b21fde7ba85 (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 42282897b00a750058ea2c2b8f9aad1303e23f25 Author: Philippe Brochard Date: Fri Jan 11 23:42:38 2013 +0100 Optimize hidden rectangle only for windows types in *show-hide-policy-type* (handle frame case) diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index 9c28356..1d650c5 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -1226,7 +1226,8 @@ XINERAMA version 1.1 opcode: 150 (or in-current-root child-current-root-p))))) (hidden-child-p (rect) - (when (member (window-type (child-rect-child rect)) *show-hide-policy-type*) + (when (or (frame-p (child-rect-child rect)) + (member (window-type (child-rect-child rect)) *show-hide-policy-type*)) (dolist (r displayed-child) (when (and (rect-hidden-p r rect) (or (not (xlib:window-p (child-rect-child r))) commit a1e53120e92c16241d88ffc661b41b251598aba3 Author: Philippe Brochard Date: Fri Jan 11 23:33:58 2013 +0100 Optimize hidden rectangle only for windows types in *show-hide-policy-type* (:normal by default) diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index 72240f3..9c28356 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -1226,11 +1226,12 @@ XINERAMA version 1.1 opcode: 150 (or in-current-root child-current-root-p))))) (hidden-child-p (rect) - (dolist (r displayed-child) - (when (and (rect-hidden-p r rect) - (or (not (xlib:window-p (child-rect-child r))) - (eq (window-type (child-rect-child r)) :normal))) - (return t)))) + (when (member (window-type (child-rect-child rect)) *show-hide-policy-type*) + (dolist (r displayed-child) + (when (and (rect-hidden-p r rect) + (or (not (xlib:window-p (child-rect-child r))) + (eq (window-type (child-rect-child r)) :normal))) + (return t))))) (select-and-display (child parent selected-p) (multiple-value-bind (nx ny nw nh) diff --git a/src/package.lisp b/src/package.lisp index c3c495b..e072287 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -127,6 +127,9 @@ It is particulary useful with CLISP/MIT-CLX.") '<': Hide only children less than children above. '<=': Hide children less or equal to children above (better for performance on slow machine).") +(defconfig *show-hide-policy-type* '(:normal) + nil "Windows types which are optimized by the show hide policy") + (defstruct child-rect child parent selected-p x y w h) (defstruct root child original current-child x y w h) ----------------------------------------------------------------------- Summary of changes: src/clfswm-internal.lisp | 12 +++++++----- src/package.lisp | 3 +++ 2 files changed, 10 insertions(+), 5 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Fri Jan 18 22:36:38 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Fri, 18 Jan 2013 14:36:38 -0800 Subject: [clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-13-g15f619e 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 15f619e265ec99fa153c82ee40cff2ecc428501b (commit) from 42282897b00a750058ea2c2b8f9aad1303e23f25 (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 15f619e265ec99fa153c82ee40cff2ecc428501b Author: Philippe Brochard Date: Fri Jan 18 23:36:32 2013 +0100 Only windows with no transient windows participate in hidden children optimization diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index 1d650c5..61fd5dc 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -1204,8 +1204,22 @@ XINERAMA version 1.1 opcode: 150 "Show all children and hide those not in a root frame" (declare (ignore from-root-frame)) (let ((geometry-change nil) - (hidden-child nil)) - (labels ((in-displayed-list (child) + (hidden-child nil) + (has-no-leader-list nil)) + (labels ((set-has-no-leader-list () + (let ((window-list nil) + (leader-list nil)) + (with-all-windows (*root-frame* win) + (let ((leader (window-leader win))) + (when leader + (when (member leader window-list :test (lambda (x y) (eql x (first y)))) + (pushnew leader leader-list)) + (push (list leader win) window-list)))) + (dolist (leader-win window-list) + (unless (member leader-win leader-list :test (lambda (x y) (eql (first x) y))) + (push (second leader-win) has-no-leader-list))))) + + (in-displayed-list (child) (member child displayed-child :test (lambda (c rect) (child-equal-p c (child-rect-child rect))))) @@ -1240,7 +1254,8 @@ XINERAMA version 1.1 opcode: 150 (let ((rect (make-child-rect :child child :parent parent :selected-p selected-p :x nx :y ny :w nw :h nh))) - (if (and *show-hide-policy* (hidden-child-p rect)) + (if (and *show-hide-policy* (hidden-child-p rect) + (member child has-no-leader-list :test #'child-equal-p)) (add-in-hidden-list child) (push rect displayed-child))))) @@ -1267,6 +1282,7 @@ XINERAMA version 1.1 opcode: 150 (select-and-display child parent selected-p))))) (setf displayed-child nil) + (set-has-no-leader-list) (rec *root-frame* nil t (child-root-p *root-frame*)) (display-displayed-child) (dolist (child hidden-child) diff --git a/src/clfswm.lisp b/src/clfswm.lisp index 62cdf76..730d5d8 100644 --- a/src/clfswm.lisp +++ b/src/clfswm.lisp @@ -79,9 +79,9 @@ (when (or (child-equal-p window (current-child)) (is-in-current-child-p window)) (setf change (or change :moved)) + (show-all-children) (focus-window window) - (focus-all-children window (find-parent-frame window (find-current-root))) - (show-all-children)))))) + (focus-all-children window (find-parent-frame window (find-current-root)))))))) (unless (eq change :resized) ;; To be ICCCM compliant, send a fake configuration notify event only when ;; the window has moved and not when it has been resized or the border width has changed. diff --git a/src/xlib-util.lisp b/src/xlib-util.lisp index 6210c6e..3fef7cf 100644 --- a/src/xlib-util.lisp +++ b/src/xlib-util.lisp @@ -374,6 +374,16 @@ they should be windows. So use this function to make a window out of them." (eql (window-state window) +iconic-state+)) +(defun window-transient-for (window) + (first (xlib:get-property window :WM_TRANSIENT_FOR))) + +(defun window-leader (window) + (when window + (or (first (xlib:get-property window :WM_CLIENT_LEADER)) + (let ((id (window-transient-for window))) + (when id + (window-leader id)))))) + (defun unhide-window (window) ----------------------------------------------------------------------- Summary of changes: src/clfswm-internal.lisp | 22 +++++++++++++++++++--- src/clfswm.lisp | 4 ++-- src/xlib-util.lisp | 10 ++++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager