Merge branch 'master' into next
This commit is contained in:
commit
f32cc6f4ae
11
src/x.c
11
src/x.c
|
@ -823,6 +823,12 @@ void x_push_changes(Con *con) {
|
||||||
DLOG("Not updating focus (to %p / %s), focused window is not mapped.\n", focused, focused->name);
|
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 */
|
/* Invalidate focused_id to correctly focus new windows with the same ID */
|
||||||
focused_id = XCB_NONE;
|
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 {
|
} else {
|
||||||
DLOG("Updating focus (focused: %p / %s)\n", focused, focused->name);
|
DLOG("Updating focus (focused: %p / %s)\n", focused, focused->name);
|
||||||
/* We remove XCB_EVENT_MASK_FOCUS_CHANGE from the event mask to get
|
/* We remove XCB_EVENT_MASK_FOCUS_CHANGE from the event mask to get
|
||||||
|
@ -838,12 +844,9 @@ void x_push_changes(Con *con) {
|
||||||
xcb_change_window_attributes(conn, focused->window->id, XCB_CW_EVENT_MASK, values);
|
xcb_change_window_attributes(conn, focused->window->id, XCB_CW_EVENT_MASK, values);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (focused->window != NULL &&
|
ewmh_update_active_window(to_focus);
|
||||||
focused->window->needs_take_focus) {
|
|
||||||
send_take_focus(to_focus);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ewmh_update_active_window(to_focus);
|
|
||||||
focused_id = to_focus;
|
focused_id = to_focus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue