From fb9a5113bdd146c4d1b110f9d68a6befc2417f60 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Wed, 15 Apr 2015 19:51:54 +0000 Subject: [PATCH] Allow adding hidden windows This simplifies the system implementation because it can add windows as soon as their created but before they're mapped. The WM can also keep track of windows the entire time they exist. --- wm-wmii.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wm-wmii.c b/wm-wmii.c index ba6cea7..e31f074 100644 --- a/wm-wmii.c +++ b/wm-wmii.c @@ -330,7 +330,7 @@ static void put_win_col(win_t *win, tag_t *tag, dpy_t *dpy, col_t *col) { row_t *row = new0(row_t); row->win = win; - row->state = win->state ?: ST_SHOW; + row->state = win->state; if (col == NULL) { col = new0(col_t); @@ -901,6 +901,10 @@ void wm_insert(win_t *win) printf("wm_insert: %p\n", win); print_txt(); + /* Make sure it's visible */ + if (win->state == ST_HIDE) + return; + /* Check for toolbars */ if (win->type == TYPE_TOOLBAR) return wm_update(); -- 2.43.2