Bugfix: When there’s nothing to focus, focus the root window (Thanks fernandotcl, ThePub)

This commit is contained in:
Michael Stapelberg 2011-03-19 20:43:06 +01:00
parent 9723366eff
commit 8b9aedd2bf
1 changed files with 6 additions and 0 deletions

View File

@ -651,6 +651,12 @@ void x_push_changes(Con *con) {
}
}
if (focused_id == XCB_NONE) {
DLOG("Still no window focused, better set focus to the root window\n");
xcb_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT, root, XCB_CURRENT_TIME);
focused_id = root;
}
xcb_flush(conn);
DLOG("\n\n ENDING CHANGES\n\n");