Skip to content

Commit

Permalink
core: fix debug window check in paint_preprocess
Browse files Browse the repository at this point in the history
Fixes #704

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
  • Loading branch information
yshui committed Jan 21, 2024
1 parent 6e3c862 commit 81d137a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions src/picom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 81d137a

Please sign in to comment.