From: Andy Spencer Date: Wed, 15 Apr 2015 19:51:54 +0000 (+0000) Subject: Allow adding hidden windows X-Git-Url: http://pileus.org/git/?p=wmpus;a=commitdiff_plain;h=fb9a5113bdd146c4d1b110f9d68a6befc2417f60 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. --- 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();