Merge branch 'fix-take-focus'
This commit is contained in:
commit
e2b97a6fda
11
src/x.c
11
src/x.c
|
@ -848,6 +848,12 @@ void x_push_changes(Con *con) {
|
|||
DLOG("Not updating focus (to %p / %s), focused window is not mapped.\n", focused, focused->name);
|
||||
/* Invalidate focused_id to correctly focus new windows with the same ID */
|
||||
focused_id = XCB_NONE;
|
||||
} else {
|
||||
if (focused->window != NULL &&
|
||||
focused->window->needs_take_focus) {
|
||||
DLOG("Updating focus by sending WM_TAKE_FOCUS to window 0x%08x only (focused: %p / %s)\n",
|
||||
to_focus, focused, focused->name);
|
||||
send_take_focus(to_focus);
|
||||
} else {
|
||||
DLOG("Updating focus (focused: %p / %s)\n", focused, focused->name);
|
||||
/* We remove XCB_EVENT_MASK_FOCUS_CHANGE from the event mask to get
|
||||
|
@ -863,12 +869,9 @@ void x_push_changes(Con *con) {
|
|||
xcb_change_window_attributes(conn, focused->window->id, XCB_CW_EVENT_MASK, values);
|
||||
}
|
||||
|
||||
if (focused->window != NULL &&
|
||||
focused->window->needs_take_focus) {
|
||||
send_take_focus(to_focus);
|
||||
ewmh_update_active_window(to_focus);
|
||||
}
|
||||
|
||||
ewmh_update_active_window(to_focus);
|
||||
focused_id = to_focus;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue