Ignore InputHint when not in WM_HINTS

When InputHint is not in WM_HINTS (i.e., the flag is not set), treat the window
as if the InputHint was set (the default behavior). This means that i3 will
focus the window when it becomes managed.

fixes #1676
This commit is contained in:
Tony Crisci
2015-04-25 22:43:46 -04:00
parent 57ddd00814
commit 6cbe349774
2 changed files with 16 additions and 5 deletions

View File

@ -271,8 +271,10 @@ void window_update_hints(i3Window *win, xcb_get_property_reply_t *prop, bool *ur
return;
}
win->doesnt_accept_focus = !hints.input;
LOG("WM_HINTS.input changed to \"%d\"\n", hints.input);
if (hints.flags & XCB_ICCCM_WM_HINT_INPUT) {
win->doesnt_accept_focus = !hints.input;
LOG("WM_HINTS.input changed to \"%d\"\n", hints.input);
}
if (urgency_hint != NULL)
*urgency_hint = (xcb_icccm_wm_hints_get_urgency(&hints) != 0);