core: fix debug window check in paint_preprocess

Fixes #704

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2024-01-21 17:27:05 +00:00
parent 6e3c86226b
commit 81d137a3cc
2 changed files with 8 additions and 2 deletions

View File

@@ -270,6 +270,11 @@ 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) {
// XXX the hope here is the WM will destroy the frame window
// quickly after the client window is destroyed. Otherwise a
// frame window without a client window would linger around. Who
// knows what kind of bugs it could cause. This has caused at
// least one: #704
win_unmark_client(ps, mw);
win_set_flags(mw, WIN_FLAGS_CLIENT_STALE);
ps->pending_updates = true;

View File

@@ -980,8 +980,9 @@ static bool paint_preprocess(session_t *ps, bool *fade_running, bool *animation,
if (w->state == WSTATE_UNMAPPED) {
log_trace("|- is unmapped");
to_paint = false;
} else if (unlikely(w->base.id == ps->debug_window ||
w->client_win == ps->debug_window)) {
} else if (unlikely(ps->debug_window != XCB_NONE) &&
(w->base.id == ps->debug_window ||
w->client_win == ps->debug_window)) {
log_trace("|- is the debug window");
to_paint = false;
} else if (!w->ever_damaged && w->state != WSTATE_UNMAPPING &&