From 87110a87a861f729f89abde0d95a77eccb545a52 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 26 Apr 2014 17:20:21 +0200 Subject: [PATCH] i3bar: render separators retina-correctly --- i3bar/src/child.c | 2 +- i3bar/src/xcb.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/i3bar/src/child.c b/i3bar/src/child.c index 53aef2fa..0e1280d7 100644 --- a/i3bar/src/child.c +++ b/i3bar/src/child.c @@ -156,7 +156,7 @@ static int stdin_start_map(void *context) { memset(&(ctx->block), '\0', sizeof(struct status_block)); /* Default width of the separator block. */ - ctx->block.sep_block_width = 9; + ctx->block.sep_block_width = logical_px(9); return 1; } diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index 5204d716..fd66a3f9 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -185,8 +185,8 @@ void refresh_statusline(void) { if (TAILQ_NEXT(block, blocks) != NULL && !block->no_separator && block->sep_block_width > 0) { /* This is not the last block, draw a separator. */ uint32_t sep_offset = block->sep_block_width/2 + block->sep_block_width % 2; - uint32_t mask = XCB_GC_FOREGROUND | XCB_GC_BACKGROUND; - uint32_t values[] = { colors.sep_fg, colors.bar_bg }; + uint32_t mask = XCB_GC_FOREGROUND | XCB_GC_BACKGROUND | XCB_GC_LINE_WIDTH; + uint32_t values[] = { colors.sep_fg, colors.bar_bg, logical_px(1) }; xcb_change_gc(xcb_connection, statusline_ctx, mask, values); xcb_poly_line(xcb_connection, XCB_COORD_MODE_ORIGIN, statusline_pm, statusline_ctx, 2,