From: Philippe Brochard Date: Sun, 11 Aug 2013 21:19:48 +0000 (+0200) Subject: Use a more general method to not activate child under clfswm terminal (or xvkbd virtu... X-Git-Url: https://repo.or.cz/w/clfswm.git/commitdiff_plain/7da85e9e5a4bc8212c5501a473907be37ddc1053 Use a more general method to not activate child under clfswm terminal (or xvkbd virtual keyboard) --- diff --git a/src/clfswm-corner.lisp b/src/clfswm-corner.lisp index 1f9904f..5669c49 100644 --- a/src/clfswm-corner.lisp +++ b/src/clfswm-corner.lisp @@ -91,6 +91,7 @@ stop the button event" (defun generic-present-body (cmd wait-test win &optional focus-p) (stop-button-event) + (no-focus) (unless (find-window-in-query-tree win) (do-shell cmd) (setf win (wait-window-in-query-tree wait-test)) diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index 43ce372..183bfa9 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -230,6 +230,11 @@ (return (values t (second type))))))) +(defun never-managed-window-and-handled-p (window) + (multiple-value-bind (never-managed handle) + (never-managed-window-p window) + (and never-managed handle))) + (defgeneric child-name (child)) diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp index b9d59a2..2acb2d3 100644 --- a/src/clfswm-util.lisp +++ b/src/clfswm-util.lisp @@ -786,10 +786,10 @@ mouse-fun is #'move-frame or #'resize-frame" (when (and root-p *create-frame-on-root*) (add-new-frame)) (when (and (frame-p child) (not (child-root-p child)) - (not (equal-clfswm-terminal window))) + (not (never-managed-window-and-handled-p window))) (funcall mouse-fn child parent root-x root-y)) (when (and child parent - (not (equal-clfswm-terminal window)) + (not (never-managed-window-and-handled-p window)) (focus-all-children child parent (not (child-root-p child)))) (when (show-all-children) (setf to-replay nil)))