From 018294a65cfefbc6c3774434f84faa6b665c153d Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sat, 11 Apr 2020 02:35:21 +0100 Subject: [PATCH] event: destroy: delay client recheck on destroy notify Mark it CLIENT_STALE and clear the client instead of recheck it immediately. It's better to recheck when we have the server grabbed. Signed-off-by: Yuxuan Shui --- src/event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/event.c b/src/event.c index 80d6067..5150e9a 100644 --- a/src/event.c +++ b/src/event.c @@ -275,7 +275,8 @@ static inline void ev_destroy_notify(session_t *ps, xcb_destroy_notify_event_t * if (w != NULL) { auto _ attr_unused = destroy_win_start(ps, w); } else if (mw != NULL) { - win_recheck_client(ps, mw); + win_unmark_client(ps, mw); + win_set_flags(mw, WIN_FLAGS_CLIENT_STALE); } else { log_debug("Received a destroy notify from an unknown window, %#010x", ev->window);