From fa83b46dfa8c77130ed1225ac70aa6482967ea61 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 21 Jan 2012 11:07:10 +0000 Subject: [PATCH] =?utf8?q?Draw=20a=20separator=20line=20after=20each=20tab?= =?utf8?q?=20(doesn=E2=80=99t=20use=20extra=20space)=20(by=20Aaron=20Small?= =?utf8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/x.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/x.c b/src/x.c index 8eacd2b7..3ef4df0a 100644 --- a/src/x.c +++ b/src/x.c @@ -447,7 +447,14 @@ void x_draw_decoration(Con *con) { * on the border pixels on the right side of a window. Therefore, we draw * the right border again after rendering the text (and the unconnected * lines in border color). */ - xcb_change_gc(conn, parent->pm_gc, XCB_GC_FOREGROUND, (uint32_t[]){ p->color->background }); + + /* Draw a separator line after every tab (except the last one), so that + * tabs can be easily distinguished. */ + if (parent->layout == L_TABBED && TAILQ_NEXT(con, nodes) != NULL) { + xcb_change_gc(conn, parent->pm_gc, XCB_GC_FOREGROUND, (uint32_t[]){ p->color->border }); + } else { + xcb_change_gc(conn, parent->pm_gc, XCB_GC_FOREGROUND, (uint32_t[]){ p->color->background }); + } xcb_poly_line(conn, XCB_COORD_MODE_ORIGIN, parent->pixmap, parent->pm_gc, 4, (xcb_point_t[]){ { dr->x + dr->width - 1, dr->y }, -- 2.39.5