From: Michael Stapelberg Date: Wed, 25 Mar 2015 19:48:51 +0000 (+0100) Subject: Restore placeholder windows after restarting (Thanks Airblader). X-Git-Tag: 4.10.1~26 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f790fedce385862c7a22df53d527960e82eff920;p=i3%2Fi3 Restore placeholder windows after restarting (Thanks Airblader). fixes #1502 --- 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; }