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 <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2020-04-11 02:35:21 +01:00
parent e15731f6cb
commit 018294a65c
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 2 additions and 1 deletions

View File

@ -275,7 +275,8 @@ static inline void ev_destroy_notify(session_t *ps, xcb_destroy_notify_event_t *
if (w != NULL) { if (w != NULL) {
auto _ attr_unused = destroy_win_start(ps, w); auto _ attr_unused = destroy_win_start(ps, w);
} else if (mw != NULL) { } else if (mw != NULL) {
win_recheck_client(ps, mw); win_unmark_client(ps, mw);
win_set_flags(mw, WIN_FLAGS_CLIENT_STALE);
} else { } else {
log_debug("Received a destroy notify from an unknown window, %#010x", log_debug("Received a destroy notify from an unknown window, %#010x",
ev->window); ev->window);