From fbe25297b7921c390bcdac846710667fc04569f8 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 11 Feb 2015 21:13:19 +0100 Subject: [PATCH] Properly invalidate rendering cache when updating orientation (Thanks hercek) fixes #1445 --- include/con.h | 6 ++++++ src/con.c | 2 +- src/tree.c | 3 +-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/con.h b/include/con.h index 5d761f68..b025adab 100644 --- a/include/con.h +++ b/include/con.h @@ -356,3 +356,9 @@ void con_set_urgency(Con *con, bool urgent); * */ char *con_get_tree_representation(Con *con); + +/** + * force parent split containers to be redrawn + * + */ +void con_force_split_parents_redraw(Con *con); diff --git a/src/con.c b/src/con.c index 38ea0585..4957c303 100644 --- a/src/con.c +++ b/src/con.c @@ -20,7 +20,7 @@ static void con_on_remove_child(Con *con); * force parent split containers to be redrawn * */ -static void con_force_split_parents_redraw(Con *con) { +void con_force_split_parents_redraw(Con *con) { Con *parent = con; while (parent && parent->type != CT_WORKSPACE && parent->type != CT_DOCKAREA) { diff --git a/src/tree.c b/src/tree.c index a6b15122..e99c5063 100644 --- a/src/tree.c +++ b/src/tree.c @@ -407,8 +407,7 @@ void tree_split(Con *con, orientation_t orientation) { Con *parent = con->parent; /* Force re-rendering to make the indicator border visible. */ - FREE(con->deco_render_params); - FREE(parent->deco_render_params); + con_force_split_parents_redraw(con); /* if we are in a container whose parent contains only one * child (its split functionality is unused so far), we just change the -- 2.39.2