From: Michael Stapelberg Date: Sun, 15 Dec 2013 13:57:04 +0000 (+0100) Subject: replace never-true condition with a working one X-Git-Tag: 4.8~186 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=28a993e65614c2a50f440db5cb2e9a5b138ea152;p=i3%2Fi3 replace never-true condition with a working one state->initial is set to false before calling x_push_node() since we began pushing the window stack before pushing changes. Therefore, the condition could never be true. --- diff --git a/src/x.c b/src/x.c index ac5498d2..6fe7df38 100644 --- a/src/x.c +++ b/src/x.c @@ -731,10 +731,9 @@ void x_push_node(Con *con) { } /* Map if map state changed, also ensure that the child window - * is changed if we are mapped *and* in initial state (meaning the - * container was empty before, but now got a child). Unmaps are handled in - * x_push_node_unmaps(). */ - if ((state->mapped != con->mapped || (con->mapped && state->initial)) && + * is changed if we are mapped and there is a new, unmapped child window. + * Unmaps are handled in x_push_node_unmaps(). */ + if ((state->mapped != con->mapped || (con->window != NULL && !state->child_mapped)) && con->mapped) { xcb_void_cookie_t cookie;