stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[STUMP] [PATCH] Don't draw frame outlines if outline width is 0


From: Antti Nykanen
Subject: [STUMP] [PATCH] Don't draw frame outlines if outline width is 0
Date: Sat, 2 May 2009 19:45:57 +0300

This allows you to call (set-frame-outline-width 0) to get rid of the
outlines.
---
 tile-group.lisp |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/tile-group.lisp b/tile-group.lisp
index d5fa1c1..27ce0c3 100644
--- a/tile-group.lisp
+++ b/tile-group.lisp
@@ -769,20 +769,21 @@ depending on the tree's split direction."
          (width (screen-frame-outline-width screen))
          (gc (screen-frame-outline-gc screen))
          (halfwidth (/ width 2)))
-    (let ((x (frame-x f))
-          (y (frame-display-y group f))
-          (w (frame-width f))
-          (h (frame-display-height group f)))
-      (when tl
-        (xlib:draw-line win gc
-                        x (+ halfwidth y) w 0 t)
-        (xlib:draw-line win gc
-                        (+ halfwidth x) y 0 h t))
-      (when br
-        (xlib:draw-line win gc
-                        (+ x (- w halfwidth)) y 0 h t)
-        (xlib:draw-line win gc
-                        x (+ y (- h halfwidth)) w 0 t)))))
+    (when (> width 0)
+      (let ((x (frame-x f))
+           (y (frame-display-y group f))
+           (w (frame-width f))
+           (h (frame-display-height group f)))
+       (when tl
+         (xlib:draw-line win gc
+                         x (+ halfwidth y) w 0 t)
+         (xlib:draw-line win gc
+                         (+ halfwidth x) y 0 h t))
+       (when br
+         (xlib:draw-line win gc
+                         (+ x (- w halfwidth)) y 0 h t)
+         (xlib:draw-line win gc
+                         x (+ y (- h halfwidth)) w 0 t))))))
 
 (defun draw-frame-outlines (group &optional head)
   "Draw an outline around all frames in GROUP."
-- 
1.6.2.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]