[clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-1-g206ae17
Philippe Brochard
pbrochard at common-lisp.net
Sun Dec 9 20:40:17 UTC 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CLFSWM - A(nother) Common Lisp FullScreen Window Manager".
The branch, master has been updated
via 206ae17424bc8a5939c7850b78de0bd99548975e (commit)
from 24e28dc07aa24a1f785c94c670c14500764549b1 (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 206ae17424bc8a5939c7850b78de0bd99548975e
Author: Philippe Brochard <pbrochard at common-lisp.net>
Date: Sun Dec 9 21:40:11 2012 +0100
Move or resize blank window with the mouse
diff --git a/clfswm-session.desktop b/clfswm-session.desktop
index cd86f22..34b1d93 100644
--- a/clfswm-session.desktop
+++ b/clfswm-session.desktop
@@ -1,5 +1,5 @@
[Desktop Entry]
-Version=1209.2
+Version=1212
Encoding=UTF-8
Name=clfswm
Name[en_US]=clfswm
diff --git a/clfswm.desktop b/clfswm.desktop
index 4f383c9..61237f2 100644
--- a/clfswm.desktop
+++ b/clfswm.desktop
@@ -1,5 +1,5 @@
[Desktop Entry]
-Version=1209.2
+Version=1212
Encoding=UTF-8
Type=Application
Name=clfswm
diff --git a/contrib/blank-window-mode.lisp b/contrib/blank-window-mode.lisp
index 4f6d77a..3797ebc 100644
--- a/contrib/blank-window-mode.lisp
+++ b/contrib/blank-window-mode.lisp
@@ -105,8 +105,9 @@
-(defun create-new-blank-window ()
+(defun create-new-blank-window (&rest args)
"Create a new blank window"
+ (declare (ignore args))
(with-x-pointer
(push (xlib:create-window :parent *root*
:x (- x 50) :y y
@@ -188,12 +189,41 @@
(with-current-blank-window (window)
(setf (xlib:drawable-border-width window) (if *blank-window-show-current* 1 0))))
-(defun place-current-blank-window (window root-x root-y)
- "Place the current blank window with the mouse"
+(defun find-blank-window-under-mouse ()
+ "Return the blank window under the mouse pointer if any"
+ (with-x-pointer
+ (dolist (win *blank-window-list*)
+ (when (in-window win x y)
+ (with-current-blank-window (window)
+ (setf (xlib:drawable-border-width window) 0))
+ (setf *blank-window-list* (remove win *blank-window-list* :test #'xlib:window-equal))
+ (push win *blank-window-list*)
+ (when *blank-window-show-current*
+ (with-current-blank-window (window)
+ (setf (xlib:drawable-border-width window) 1)))
+ (return-from find-blank-window-under-mouse win)))))
+
+(defun move-blank-window (window root-x root-y)
+ "Move blank window with the mouse"
+ (declare (ignore window))
+ (let ((window (find-blank-window-under-mouse)))
+ (when window
+ (move-window window root-x root-y))))
+
+(defun resize-blank-window (window root-x root-y)
+ "Resize blank window with the mouse"
(declare (ignore window))
+ (let ((window (find-blank-window-under-mouse)))
+ (when window
+ (resize-window window root-x root-y))))
+
+(defun hide-unhide-current-blank-window ()
+ "Hide or unhide the current blank window"
(with-current-blank-window (window)
- (setf (xlib:drawable-x window) root-x
- (xlib:drawable-y window) root-y)))
+ (if (window-hidden-p window)
+ (unhide-window window)
+ (hide-window window))))
+
(defun blank-black-window ()
"Open a black window. ie light of the screen"
@@ -241,11 +271,14 @@
(define-blank-window-key ("m") 'blank-window-inc-width -1)
(define-blank-window-key ("l") 'blank-window-inc-height -1)
(define-blank-window-key ("Delete") 'remove-current-blank-window)
+ (define-blank-window-key ("t") 'hide-unhide-current-blank-window)
(define-blank-window-key ("Control_R") 'banish-pointer)
(define-blank-window-key ("b") 'banish-pointer)
(define-blank-window-key ("x") 'blank-black-window)
- (define-blank-window-mouse (1) 'place-current-blank-window))
+ (define-blank-window-mouse (1) 'move-blank-window)
+ (define-blank-window-mouse (2) 'create-new-blank-window)
+ (define-blank-window-mouse (3) 'resize-blank-window))
-----------------------------------------------------------------------
Summary of changes:
clfswm-session.desktop | 2 +-
clfswm.desktop | 2 +-
contrib/blank-window-mode.lisp | 45 ++++++++++++++++++++++++++++++++++-----
3 files changed, 41 insertions(+), 8 deletions(-)
hooks/post-receive
--
CLFSWM - A(nother) Common Lisp FullScreen Window Manager
More information about the clfswm-cvs
mailing list