From 87dedbf167dec01265e2a3ad57213447713c2b3c Mon Sep 17 00:00:00 2001 From: Philippe Brochard Date: Sat, 10 Aug 2013 23:12:20 +0200 Subject: [PATCH] Do not activate/handle child under the clfswm terminal when it is present --- contrib/moc.lisp | 2 +- src/clfswm-corner.lisp | 2 +- src/clfswm-util.lisp | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/contrib/moc.lisp b/contrib/moc.lisp index 3a66bde..9e604e1 100644 --- a/contrib/moc.lisp +++ b/contrib/moc.lisp @@ -40,7 +40,7 @@ (defun start-mocp () "Start mocp" - (do-shell "exec xterm -e 'mocp 2> /dev/null'")) + (do-shell "xterm -e 'mocp 2> /dev/null'")) (defun show-moc-info () diff --git a/src/clfswm-corner.lisp b/src/clfswm-corner.lisp index 9c1597c..1f9904f 100644 --- a/src/clfswm-corner.lisp +++ b/src/clfswm-corner.lisp @@ -130,7 +130,7 @@ stop the button event" (let (win) (defun equal-clfswm-terminal (window) - (when win + (when (and win (xlib:window-p window)) (xlib:window-equal window win))) (defun close-clfswm-terminal () (when win diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp index 2d24a98..b9d59a2 100644 --- a/src/clfswm-util.lisp +++ b/src/clfswm-util.lisp @@ -767,7 +767,7 @@ Write (defparameter *contrib-dir* \"/usr/local/lib/clfswm/\") in ~A.~%" -(defun mouse-click-to-focus-generic (root-x root-y mouse-fn) +(defun mouse-click-to-focus-generic (window root-x root-y mouse-fn) "Focus the current frame or focus the current window parent mouse-fun is #'move-frame or #'resize-frame" (let* ((to-replay t) @@ -785,9 +785,11 @@ mouse-fun is #'move-frame or #'resize-frame" (pushnew child (frame-child parent))))) (when (and root-p *create-frame-on-root*) (add-new-frame)) - (when (and (frame-p child) (not (child-root-p child))) + (when (and (frame-p child) (not (child-root-p child)) + (not (equal-clfswm-terminal window))) (funcall mouse-fn child parent root-x root-y)) (when (and child parent + (not (equal-clfswm-terminal window)) (focus-all-children child parent (not (child-root-p child)))) (when (show-all-children) (setf to-replay nil))) @@ -799,16 +801,15 @@ mouse-fun is #'move-frame or #'resize-frame" (defun mouse-click-to-focus-and-move (window root-x root-y) "Move and focus the current frame or focus the current window parent. Or do actions on corners" - (declare (ignore window)) (or (do-corner-action root-x root-y *corner-main-mode-left-button*) - (mouse-click-to-focus-generic root-x root-y #'move-frame))) + (mouse-click-to-focus-generic window root-x root-y #'move-frame))) (defun mouse-click-to-focus-and-resize (window root-x root-y) "Resize and focus the current frame or focus the current window parent. Or do actions on corners" - (declare (ignore window)) + ;;(declare (ignore window)) (or (do-corner-action root-x root-y *corner-main-mode-right-button*) - (mouse-click-to-focus-generic root-x root-y #'resize-frame))) + (mouse-click-to-focus-generic window root-x root-y #'resize-frame))) (defun mouse-middle-click (window root-x root-y) "Do actions on corners" -- 2.11.4.GIT