Bugfix: Render containers after setting the client active (Thanks Mirko)

This lead to race conditions when the window did not change its title
after mapping and was displayed in a tabbed container.
This commit is contained in:
Michael Stapelberg 2009-11-26 21:32:53 +01:00
parent abba7714ac
commit 5a1668db36
1 changed files with 3 additions and 1 deletions

View File

@ -444,8 +444,10 @@ map:
if ((CUR_CELL->workspace->fullscreen_client == NULL || new->fullscreen) && !new->dock) { if ((CUR_CELL->workspace->fullscreen_client == NULL || new->fullscreen) && !new->dock) {
/* Focus the new window if were not in fullscreen mode and if it is not a dock window */ /* Focus the new window if were not in fullscreen mode and if it is not a dock window */
if ((new->workspace->fullscreen_client == NULL) || new->fullscreen) { if ((new->workspace->fullscreen_client == NULL) || new->fullscreen) {
if (!client_is_floating(new)) if (!client_is_floating(new)) {
new->container->currently_focused = new; new->container->currently_focused = new;
render_container(conn, new->container);
}
if (new->container == CUR_CELL || client_is_floating(new)) if (new->container == CUR_CELL || client_is_floating(new))
xcb_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT, new->child, XCB_CURRENT_TIME); xcb_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT, new->child, XCB_CURRENT_TIME);
} }