]> git.sur5r.net Git - i3/i3/commitdiff
Fix rendering of window decorations in stacking mode (there was a 1px-line too much)
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 8 Aug 2009 18:20:06 +0000 (20:20 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 8 Aug 2009 18:20:06 +0000 (20:20 +0200)
src/layout.c

index c0471173bd0e376d251001f110f830e13298cb8c..5e63c9c7c5f8db6fdfc7752c5e94123064d544be 100644 (file)
@@ -156,8 +156,11 @@ void decorate_window(xcb_connection_t *conn, Client *client, xcb_drawable_t draw
         if (client->titlebar_position != TITLEBAR_OFF) {
                 /* Draw the lines */
                 xcb_draw_line(conn, drawable, gc, color->border, 0, offset, client->rect.width, offset);
-                xcb_draw_line(conn, drawable, gc, color->border, 2, offset + font->height + 3,
-                              client->rect.width - 3, offset + font->height + 3);
+                if ((client->container == NULL ||
+                    client->container->mode != MODE_STACK ||
+                    CIRCLEQ_NEXT_OR_NULL(&(client->container->clients), client, clients) == NULL))
+                        xcb_draw_line(conn, drawable, gc, color->border, 2, offset + font->height + 3,
+                                      client->rect.width - 3, offset + font->height + 3);
         }
 
         /* If the client has a title, we draw it */