Revert "Revert previous fix for #299"
This reverts commit 04fe4a76b2.
This brings back the previous incomplete fix attempt for #299. See the
commit message of the revert for why it's incomplete.
A different fix is then attempted, see commit xxxxxxx for how that fix
works.
However, the second fix is incomplete by itself as well. The reason is
that i3 reparent the real window to the frame first, before destroying
the placeholder client of that frame. So briefly, that frame would have
2 client windows. And the frame is mapped before the placeholder is
destroyed. So even though we only call win_recheck_client when/if the
frame window is mapped, it can still be called when there are 2 client
windows, it would pick up the wrong client window in that case.
So what we need is to combine both fixes.
The second fix makes sure we are up to date on the client window
information when we starts to listen for events on the frame window;
while the first fix would keep us up to date afterwards.
This revert also includes a fix for assertion failure raised in #371
See #299 for root cause of the bug.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@@ -303,9 +303,9 @@ uint32_t determine_evmask(session_t *ps, xcb_window_t wid, win_evmode_t mode) {
|
||||
struct managed_win *w = NULL;
|
||||
|
||||
// Check if it's a mapped frame window
|
||||
if (WIN_EVMODE_FRAME == mode ||
|
||||
if (mode == WIN_EVMODE_FRAME ||
|
||||
((w = find_managed_win(ps, wid)) && w->a.map_state == XCB_MAP_STATE_VIEWABLE)) {
|
||||
evmask |= XCB_EVENT_MASK_PROPERTY_CHANGE;
|
||||
evmask |= XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY;
|
||||
if (!ps->o.use_ewmh_active_win) {
|
||||
evmask |= XCB_EVENT_MASK_FOCUS_CHANGE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user