Restore placeholder windows after restarting (Thanks Airblader).
fixes #1502
This commit is contained in:
parent
bbb035d975
commit
f790fedce3
|
@ -180,7 +180,9 @@ static void update_placeholder_contents(placeholder_state *state) {
|
||||||
|
|
||||||
static void open_placeholder_window(Con *con) {
|
static void open_placeholder_window(Con *con) {
|
||||||
if (con_is_leaf(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(
|
xcb_window_t placeholder = create_window(
|
||||||
restore_conn,
|
restore_conn,
|
||||||
con->rect,
|
con->rect,
|
||||||
|
|
|
@ -104,6 +104,8 @@ bool tree_restore(const char *path, xcb_get_geometry_reply_t *geometry) {
|
||||||
TAILQ_INSERT_HEAD(&(croot->nodes_head), __i3, nodes);
|
TAILQ_INSERT_HEAD(&(croot->nodes_head), __i3, nodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
restore_open_placeholder_windows(croot);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue