]> git.mdlowis.com Git - proto/anvil.git/commitdiff
fixed inner border drawing when client is shaded
authorMichael D. Lowis <mike.lowis@gentex.com>
Wed, 7 Jul 2021 20:55:38 +0000 (16:55 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Wed, 7 Jul 2021 20:55:38 +0000 (16:55 -0400)
client.c

index 60f281eaefb2ede76244476f441d846a8f1ff5a0..3960f8e27293d5ee7b4650a8a2f3da4d55859774 100644 (file)
--- a/client.c
+++ b/client.c
@@ -73,16 +73,19 @@ void client_draw(Client* c)
         XDrawLine(X.disp, c->frame, DefaultGC(X.disp, X.screen), c->w-1, 0, c->w-1, c->h);
 
         /* draw inner border */
-        int bw = BORDER_WIDTH;
-        int mh = MIN_HEIGHT;
-        XDrawLine(X.disp, c->frame, DefaultGC(X.disp, X.screen),
-            bw-1, mh-1, c->w-bw, mh-1);
-        XDrawLine(X.disp, c->frame, DefaultGC(X.disp, X.screen),
-            bw-1, c->h-bw, c->w-bw, c->h-bw);
-        XDrawLine(X.disp, c->frame, DefaultGC(X.disp, X.screen),
-            bw-1, mh-1, bw-1, c->h-bw);
-        XDrawLine(X.disp, c->frame, DefaultGC(X.disp, X.screen),
-            c->w-bw, mh-1, c->w-bw, c->h-bw);
+        if (!(c->flags & F_SHADED))
+        {
+            int bw = BORDER_WIDTH;
+            int mh = MIN_HEIGHT;
+            XDrawLine(X.disp, c->frame, DefaultGC(X.disp, X.screen),
+                bw-1, mh-1, c->w-bw, mh-1);
+            XDrawLine(X.disp, c->frame, DefaultGC(X.disp, X.screen),
+                bw-1, c->h-bw, c->w-bw, c->h-bw);
+            XDrawLine(X.disp, c->frame, DefaultGC(X.disp, X.screen),
+                bw-1, mh-1, bw-1, c->h-bw);
+            XDrawLine(X.disp, c->frame, DefaultGC(X.disp, X.screen),
+                c->w-bw, mh-1, c->w-bw, c->h-bw);
+        }
 
         /* draw title text */
         if (c->name) {