From e7a4580c5f5f895df2990dae0f26a8662d58d80f Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 29 Oct 2012 16:41:16 +0100 Subject: [PATCH] =?utf8?q?Bugfix:=20force=20rendering=20when=20the=20paren?= =?utf8?q?t=E2=80=99s=20orientation=20changed?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Otherwise, the split indicator might not be refreshed even though it should be. fixes #858 --- include/data.h | 1 + src/x.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/data.h b/include/data.h index 02f781c9..fa3e031d 100644 --- a/include/data.h +++ b/include/data.h @@ -135,6 +135,7 @@ struct deco_render_params { Rect con_deco_rect; uint32_t background; bool con_is_leaf; + orientation_t parent_orientation; }; /** diff --git a/src/x.c b/src/x.c index a3f42b6a..ba157e2b 100644 --- a/src/x.c +++ b/src/x.c @@ -350,6 +350,7 @@ void x_draw_decoration(Con *con) { p->con_deco_rect = con->deco_rect; p->background = config.client.background; p->con_is_leaf = con_is_leaf(con); + p->parent_orientation = con_orientation(parent); if (con->deco_render_params != NULL && (con->window == NULL || !con->window->name_x_changed) && @@ -444,7 +445,7 @@ void x_draw_decoration(Con *con) { TAILQ_PREV(con, nodes_head, nodes) == NULL && con->parent->type != CT_FLOATING_CON) { xcb_change_gc(conn, con->pm_gc, XCB_GC_FOREGROUND, (uint32_t[]){ p->color->indicator }); - if (con_orientation(con->parent) == HORIZ) + if (p->parent_orientation == HORIZ) xcb_poly_fill_rectangle(conn, con->pixmap, con->pm_gc, 1, (xcb_rectangle_t[]){ { r->width + br.width + br.x, br.y, r->width, r->height + br.height } }); else -- 2.39.5