From: Philippe Brochard Date: Fri, 11 Jan 2013 22:33:58 +0000 (+0100) Subject: Optimize hidden rectangle only for windows types in *show-hide-policy-type* (:normal... X-Git-Url: https://repo.or.cz/w/clfswm.git/commitdiff_plain/a1e53120e92c16241d88ffc661b41b251598aba3 Optimize hidden rectangle only for windows types in *show-hide-policy-type* (:normal by default) --- diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index 72240f3..9c28356 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -1226,11 +1226,12 @@ XINERAMA version 1.1 opcode: 150 (or in-current-root child-current-root-p))))) (hidden-child-p (rect) - (dolist (r displayed-child) - (when (and (rect-hidden-p r rect) - (or (not (xlib:window-p (child-rect-child r))) - (eq (window-type (child-rect-child r)) :normal))) - (return t)))) + (when (member (window-type (child-rect-child rect)) *show-hide-policy-type*) + (dolist (r displayed-child) + (when (and (rect-hidden-p r rect) + (or (not (xlib:window-p (child-rect-child r))) + (eq (window-type (child-rect-child r)) :normal))) + (return t))))) (select-and-display (child parent selected-p) (multiple-value-bind (nx ny nw nh) diff --git a/src/package.lisp b/src/package.lisp index c3c495b..e072287 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -127,6 +127,9 @@ It is particulary useful with CLISP/MIT-CLX.") '<': Hide only children less than children above. '<=': Hide children less or equal to children above (better for performance on slow machine).") +(defconfig *show-hide-policy-type* '(:normal) + nil "Windows types which are optimized by the show hide policy") + (defstruct child-rect child parent selected-p x y w h) (defstruct root child original current-child x y w h)