core: listen for substructure notify on frame windows
So we can pick up destroy notify of the client windows. Because we need the destroy notify of the client window to trigger a client window recheck on the frame window. This is to handle the case where a frame window is later reused, and the case where multiple client windows are momentarily attached to the same frame[1]. This will also cause events previously unseen to be generated. Most of the events would be ignored, because they don't have a corresponding managed window. Change has been made to ev_reparent_notify, so it would handle the case where a client window is reparented from one frame to another[2]. Previously such events are not received by picom. Related[1]:e9ab970989
Related[2]:481ac54f67
Related: #299 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
e9ab970989
commit
bdf809d039
|
@ -303,9 +303,9 @@ uint32_t determine_evmask(session_t *ps, xcb_window_t wid, win_evmode_t mode) {
|
||||||
struct managed_win *w = NULL;
|
struct managed_win *w = NULL;
|
||||||
|
|
||||||
// Check if it's a mapped frame window
|
// 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)) {
|
((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) {
|
if (!ps->o.use_ewmh_active_win) {
|
||||||
evmask |= XCB_EVENT_MASK_FOCUS_CHANGE;
|
evmask |= XCB_EVENT_MASK_FOCUS_CHANGE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue