event: fix damage not being added after changing window stack order

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2024-03-27 00:34:31 +00:00
parent ec4df3c512
commit a5e3de4489
No known key found for this signature in database
GPG Key ID: D3A4405BE6CC17F4
1 changed files with 9 additions and 3 deletions

View File

@ -226,14 +226,14 @@ static void configure_win(session_t *ps, xcb_configure_notify_event_t *ce) {
return;
}
wm_stack_move_above(ps->wm, w, ce->above_sibling);
if (!w->managed) {
wm_stack_move_above(ps->wm, w, ce->above_sibling);
return;
}
auto mw = (struct managed_win *)w;
wm_stack_move_above(ps->wm, w, ce->above_sibling);
add_damage_from_win(ps, mw);
// We check against pending_g here, because there might have been multiple
// configure notifies in this cycle, or the window could receive multiple updates
@ -410,6 +410,9 @@ static inline void ev_reparent_notify(session_t *ps, xcb_reparent_notify_event_t
log_debug("Restack %#010x (%s) to top", old_w->id,
win_get_name_if_managed(old_w));
wm_stack_move_to_top(ps->wm, old_w);
if (old_w->managed) {
add_damage_from_win(ps, win_as_managed(old_w));
}
}
return;
}
@ -489,6 +492,9 @@ static inline void ev_circulate_notify(session_t *ps, xcb_circulate_notify_event
} else {
wm_stack_move_to_bottom(ps->wm, w);
}
if (w->managed) {
add_damage_from_win(ps, win_as_managed(w));
}
}
static inline void expose_root(session_t *ps, const rect_t *rects, int nrects) {