typedef struct con_state {
xcb_window_t id;
bool mapped;
+ bool child_mapped;
/* For reparenting, we have a flag (need_reparent) and the X ID of the old
* frame this window was in. The latter is necessary because we need to
LOG("resetting state %p to initial\n", state);
state->initial = true;
+ state->child_mapped = false;
memset(&(state->window_rect), 0, sizeof(Rect));
}
atoms[WM_STATE], atoms[WM_STATE], 32, 2, data);
}
- if (state->initial && con->window != NULL) {
+ if (!state->child_mapped && con->window != NULL) {
cookie = 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);
+ state->child_mapped = true;
}
cookie = xcb_map_window(conn, con->frame);