Bugfix: Ignore sequences of mapping/unmapping windows to avoid getting enter_notifies
This commit is contained in:
parent
5d0f17d53d
commit
64306e813e
20
src/x.c
20
src/x.c
|
@ -226,15 +226,23 @@ static void x_push_node(Con *con) {
|
||||||
* container was empty before, but now got a child) */
|
* container was empty before, but now got a child) */
|
||||||
if (state->mapped != con->mapped || (con->mapped && state->initial)) {
|
if (state->mapped != con->mapped || (con->mapped && state->initial)) {
|
||||||
if (!con->mapped) {
|
if (!con->mapped) {
|
||||||
LOG("unmapping container\n");
|
xcb_void_cookie_t cookie;
|
||||||
xcb_unmap_window(conn, con->frame);
|
cookie = xcb_unmap_window(conn, con->frame);
|
||||||
|
LOG("unmapping container (serial %d)\n", cookie.sequence);
|
||||||
|
/* Ignore enter_notifies which are generated when unmapping */
|
||||||
|
add_ignore_event(cookie.sequence);
|
||||||
} else {
|
} else {
|
||||||
|
xcb_void_cookie_t cookie;
|
||||||
if (state->initial && con->window != NULL) {
|
if (state->initial && con->window != NULL) {
|
||||||
LOG("mapping child window\n");
|
cookie = xcb_map_window(conn, con->window->id);
|
||||||
xcb_map_window(conn, con->window->id);
|
LOG("mapping child window (serial %d)\n", cookie.sequence);
|
||||||
|
/* Ignore enter_notifies which are generated when mapping */
|
||||||
|
add_ignore_event(cookie.sequence);
|
||||||
}
|
}
|
||||||
LOG("mapping container\n");
|
cookie = xcb_map_window(conn, con->frame);
|
||||||
xcb_map_window(conn, con->frame);
|
LOG("mapping container (serial %d)\n", cookie.sequence);
|
||||||
|
/* Ignore enter_notifies which are generated when mapping */
|
||||||
|
add_ignore_event(cookie.sequence);
|
||||||
}
|
}
|
||||||
state->mapped = con->mapped;
|
state->mapped = con->mapped;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue