[clfswm-cvs] r142 - in clfswm: . src
pbrochard at common-lisp.net
pbrochard at common-lisp.net
Wed Jun 4 11:49:23 UTC 2008
Author: pbrochard
Date: Wed Jun 4 07:49:22 2008
New Revision: 142
Modified:
clfswm/ChangeLog
clfswm/src/bindings-second-mode.lisp
clfswm/src/bindings.lisp
clfswm/src/clfswm-nw-hooks.lisp
clfswm/src/clfswm-util.lisp
clfswm/src/clfswm.lisp
Log:
mouse-click-to-focus-and-move-window, mouse-click-to-focus-and-resize-window: Stop button event. This prevent a keyboard/pointer freeze.
Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog (original)
+++ clfswm/ChangeLog Wed Jun 4 07:49:22 2008
@@ -1,3 +1,9 @@
+2008-06-04 Philippe Brochard <pbrochard at common-lisp.net>
+
+ * src/bindings.lisp (mouse-click-to-focus-and-move-window)
+ (mouse-click-to-focus-and-resize-window): Stop button event. This
+ prevent a keyboard/pointer freeze.
+
2008-06-03 Philippe Brochard <pbrochard at common-lisp.net>
* src/clfswm-internal.lisp (frame-lower-child)
Modified: clfswm/src/bindings-second-mode.lisp
==============================================================================
--- clfswm/src/bindings-second-mode.lisp (original)
+++ clfswm/src/bindings-second-mode.lisp Wed Jun 4 07:49:22 2008
@@ -244,13 +244,25 @@
(leave-frame))
+(defun sm-mouse-click-to-focus-and-move-window (window root-x root-y)
+ "Move and focus the current child - Create a new frame on the root window"
+ (declare (ignore window))
+ (mouse-focus-move/resize-generic root-x root-y #'move-frame t))
+
+
+(defun sm-mouse-click-to-focus-and-resize-window (window root-x root-y)
+ "Resize and focus the current child - Create a new frame on the root window"
+ (declare (ignore window))
+ (mouse-focus-move/resize-generic root-x root-y #'resize-frame t))
+
+
(define-second-mouse (1) 'sm-mouse-click-to-focus-and-move)
(define-second-mouse (3) 'sm-mouse-click-to-focus-and-resize)
-(define-second-mouse (1 :mod-1) 'mouse-click-to-focus-and-move-window)
-(define-second-mouse (3 :mod-1) 'mouse-click-to-focus-and-resize-window)
+(define-second-mouse (1 :mod-1) 'sm-mouse-click-to-focus-and-move-window)
+(define-second-mouse (3 :mod-1) 'sm-mouse-click-to-focus-and-resize-window)
(define-second-mouse (1 :control :mod-1) 'mouse-move-window-over-frame)
Modified: clfswm/src/bindings.lisp
==============================================================================
--- clfswm/src/bindings.lisp (original)
+++ clfswm/src/bindings.lisp Wed Jun 4 07:49:22 2008
@@ -117,11 +117,14 @@
(defun mouse-click-to-focus-and-move-window (window root-x root-y)
"Move and focus the current child - Create a new frame on the root window"
(declare (ignore window))
+ (stop-button-event)
(mouse-focus-move/resize-generic root-x root-y #'move-frame t))
+
(defun mouse-click-to-focus-and-resize-window (window root-x root-y)
"Resize and focus the current child - Create a new frame on the root window"
(declare (ignore window))
+ (stop-button-event)
(mouse-focus-move/resize-generic root-x root-y #'resize-frame t))
Modified: clfswm/src/clfswm-nw-hooks.lisp
==============================================================================
--- clfswm/src/clfswm-nw-hooks.lisp (original)
+++ clfswm/src/clfswm-nw-hooks.lisp Wed Jun 4 07:49:22 2008
@@ -98,7 +98,7 @@
"Open the next window in the current root"
(leave-if-not-frame *current-root*)
(pushnew window (frame-child *current-root*))
- (setf *current-child* (first (frame-child *current-root*)))
+ (setf *current-child* (frame-selected-child *current-root*))
(default-window-placement *current-root* window)
(clear-nw-hook frame))
Modified: clfswm/src/clfswm-util.lisp
==============================================================================
--- clfswm/src/clfswm-util.lisp (original)
+++ clfswm/src/clfswm-util.lisp Wed Jun 4 07:49:22 2008
@@ -522,7 +522,7 @@
(defun move-frame (frame parent orig-x orig-y)
- (when frame
+ (when (and frame parent)
(hide-all-children frame)
(with-slots (window) frame
(move-window window orig-x orig-y #'display-frame-info (list frame))
@@ -532,7 +532,7 @@
(defun resize-frame (frame parent orig-x orig-y)
- (when frame
+ (when (and frame parent)
(hide-all-children frame)
(with-slots (window) frame
(resize-window window orig-x orig-y #'display-frame-info (list frame))
Modified: clfswm/src/clfswm.lisp
==============================================================================
--- clfswm/src/clfswm.lisp (original)
+++ clfswm/src/clfswm.lisp Wed Jun 4 07:49:22 2008
@@ -41,6 +41,7 @@
(replay-button-event)))
+
(defun handle-button-release (&rest event-slots &key code state window root-x root-y &allow-other-keys)
(declare (ignore event-slots))
(unless (funcall-button-from-code *main-mouse* code state window root-x root-y *fun-release*)
More information about the clfswm-cvs
mailing list