Optimize hidden rectangle only for windows types in *show-hide-policy-type* (:normal...
authorPhilippe Brochard <pbrochard@common-lisp.net>
Fri, 11 Jan 2013 22:33:58 +0000 (11 23:33 +0100)
committerPhilippe Brochard <pbrochard@common-lisp.net>
Fri, 11 Jan 2013 22:33:58 +0000 (11 23:33 +0100)
src/clfswm-internal.lisp
src/package.lisp

index 72240f3..9c28356 100644 (file)
@@ -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)
index c3c495b..e072287 100644 (file)
@@ -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)