From df52966bd363df0d54d2e055edaf8ff3df94a685 Mon Sep 17 00:00:00 2001 From: Philippe Brochard Date: Tue, 8 Feb 2011 23:34:26 +0100 Subject: [PATCH] src/clfswm.lisp (main-mode): Raise or not unmanaged windows following request in *never-managed-window-list*. --- ChangeLog | 5 +++++ src/clfswm-corner.lisp | 3 ++- src/clfswm-internal.lisp | 7 ++----- src/clfswm-util.lisp | 4 ++-- src/clfswm.lisp | 6 +++++- src/config.lisp | 8 ++++---- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 62f4a7e..4f89d49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-02-08 Philippe Brochard + + * src/clfswm.lisp (main-mode): Raise or not unmanaged windows + following request in *never-managed-window-list*. + 2011-02-05 Philippe Brochard * *: **** Release 1102 **** diff --git a/src/clfswm-corner.lisp b/src/clfswm-corner.lisp index 1dae591..0034f48 100644 --- a/src/clfswm-corner.lisp +++ b/src/clfswm-corner.lisp @@ -91,7 +91,8 @@ Corner is one of :bottom-right :bottom-left :top-right :top-left" (do-shell cmd) (setf win (wait-window-in-query-tree wait-test)) (hide-window win)) - (cond ((window-hidden-p win) (unhide-window win) + (cond ((window-hidden-p win) + (unhide-window win) (when focus-p (focus-window win)) (raise-window win)) diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index 5790f99..d71cc41 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -157,12 +157,9 @@ (defun never-managed-window-p (window) (dolist (type *never-managed-window-list*) - (destructuring-bind (test predicate result) type + (destructuring-bind (test predicate result raise) type (when (funcall test (funcall predicate window) result) - (return t))))) - ;;(when (string-equal (funcall (first type) window) (second type)) - ;; (return t)))) - + (return (values t raise)))))) (defgeneric child-name (child)) diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp index cc698e7..f3cd796 100644 --- a/src/clfswm-util.lisp +++ b/src/clfswm-util.lisp @@ -1464,7 +1464,7 @@ For window: set current child to window or its parent according to window-parent (defun close-notify-window () (erase-timer :refresh-notify-window) (setf *never-managed-window-list* - (remove (list #'equal #'is-notify-window-p t) *never-managed-window-list* :test #'equal)) + (remove (list #'equal #'is-notify-window-p t t) *never-managed-window-list* :test #'equal)) (when gc (xlib:free-gcontext gc)) (when window @@ -1502,7 +1502,7 @@ For window: set current child to window or its parent according to window-parent :line-style :solid)) (when (frame-p *current-child*) (setf current-child *current-child*) - (push (list #'equal #'is-notify-window-p t) *never-managed-window-list*)) + (push (list #'equal #'is-notify-window-p t t) *never-managed-window-list*)) (map-window window) (refresh-notify-window) (xlib:display-finish-output *display*)))))) diff --git a/src/clfswm.lisp b/src/clfswm.lisp index 5374eba..da12dc8 100644 --- a/src/clfswm.lisp +++ b/src/clfswm.lisp @@ -84,7 +84,11 @@ (process-new-window window) (map-window window) (unless (null-size-window-p window) - (show-all-children)))) + (multiple-value-bind (never-managed raise) + (never-managed-window-p window) + (unless (and never-managed raise) + (show-all-children)))))) + (define-handler main-mode :unmap-notify (send-event-p event-window window) (unless (and (not send-event-p) diff --git a/src/config.lisp b/src/config.lisp index 599f302..91d5b3c 100644 --- a/src/config.lisp +++ b/src/config.lisp @@ -47,11 +47,11 @@ Example: :mod-2 for num_lock, :lock for Caps_lock...") ;;; CONFIG - Never managed window list (defparameter *never-managed-window-list* - '((string-equal xlib:get-wm-class "ROX-Pinboard") - (string-equal xlib:get-wm-class "xvkbd") - (string-equal xlib:wm-name "clfswm-terminal")) + '((string-equal xlib:get-wm-class "ROX-Pinboard" nil) + (string-equal xlib:get-wm-class "xvkbd" t) + (string-equal xlib:wm-name "clfswm-terminal" t)) "Config(): CLFSWM will never manage windows of this type. -A list of (predicate-function-on-window expected-string)") +A list of (predicate-function-on-window expected-string raise-p)") (defparameter *hide-unmanaged-window* t -- 2.11.4.GIT