view: re-apply criteria when window gets unmapped

Remove any existing executed criteria items at unmap time. If a window
gets unmapped but not destroyed, we want to reapply 'for_window'
criteria. Fixes #6905.
This commit is contained in:
EBADBEEF 2023-10-20 10:29:06 -07:00 committed by Simon Ser
parent c3ec141b34
commit 86f96a786b

View file

@ -882,6 +882,8 @@ void view_unmap(struct sway_view *view) {
wl_list_remove(&view->surface_new_subsurface.link);
view->executed_criteria->length = 0;
if (view->urgent_timer) {
wl_event_source_remove(view->urgent_timer);
view->urgent_timer = NULL;