1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-11 13:51:02 -05:00

event: reparent: make sure windows are destroyed when they are reparented

Make sure the window struct is indeed destroyed and freed when a window
is reparented away from root. So we won't find it later and get
confused.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2020-04-11 02:23:58 +01:00
parent e341267e8a
commit e15731f6cb
No known key found for this signature in database
GPG key ID: 37C999F617EA1A47

View file

@ -343,7 +343,11 @@ static inline void ev_reparent_notify(session_t *ps, xcb_reparent_notify_event_t
{
auto w = find_win(ps, ev->window);
if (w) {
auto _ attr_unused = destroy_win_start(ps, w);
auto ret = destroy_win_start(ps, w);
if (!ret && w->managed) {
auto mw = (struct managed_win *)w;
CHECK(win_skip_fading(ps, mw));
}
}
}