]> git.sur5r.net Git - i3/i3/commitdiff
Restore placeholder windows after restarting (Thanks Airblader).
authorMichael Stapelberg <michael@stapelberg.de>
Wed, 25 Mar 2015 19:48:51 +0000 (20:48 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 25 Mar 2015 19:50:25 +0000 (20:50 +0100)
fixes #1502

src/restore_layout.c
src/tree.c

index 0f6e54f9cc18e68d01d832680ab201e4b503838d..c6a87f06e8aabc0c0a5e8d68bb60e200e3fbba92 100644 (file)
@@ -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,
index 9b60fea6f9cc5031fc2663d1cd494986909c08ea..b40ba2a2879203b503d7640937184fae91f3ea13 100644 (file)
@@ -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;
 }