Restore placeholder windows after restarting (Thanks Airblader).

fixes #1502
next
Michael Stapelberg 2015-03-25 20:48:51 +01:00
parent bbb035d975
commit f790fedce3
2 changed files with 5 additions and 1 deletions

View 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,

View 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;
}