From f790fedce385862c7a22df53d527960e82eff920 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 25 Mar 2015 20:48:51 +0100 Subject: [PATCH] Restore placeholder windows after restarting (Thanks Airblader). fixes #1502 --- src/restore_layout.c | 4 +++- src/tree.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/restore_layout.c b/src/restore_layout.c index 0f6e54f9..c6a87f06 100644 --- a/src/restore_layout.c +++ b/src/restore_layout.c @@ -180,7 +180,9 @@ static void update_placeholder_contents(placeholder_state *state) { static void open_placeholder_window(Con *con) { if (con_is_leaf(con) && - (con->window == NULL || con->window->id == XCB_NONE)) { + (con->window == NULL || con->window->id == XCB_NONE) && + !TAILQ_EMPTY(&(con->swallow_head)) && + con->type == CT_CON) { xcb_window_t placeholder = create_window( restore_conn, con->rect, diff --git a/src/tree.c b/src/tree.c index 9b60fea6..b40ba2a2 100644 --- a/src/tree.c +++ b/src/tree.c @@ -104,6 +104,8 @@ bool tree_restore(const char *path, xcb_get_geometry_reply_t *geometry) { TAILQ_INSERT_HEAD(&(croot->nodes_head), __i3, nodes); } + restore_open_placeholder_windows(croot); + return true; } -- 2.39.5