view: update top layer visiblity at unmap instead of destroy

It's possible for a fullscreen xwayland view to be unmapped without
being destroyed. In this case, we need to update top layer visibility,
otherwise panels and the like will remain hidden.

Since unmap is always called before destroy, it's sufficient to do the
update only in view_impl_unmap() and not in view_destroy().

Adaptive sync logic needs work still, but I tried to minimize changes
to it since I don't have hardware to test it.
This commit is contained in:
John Lindgren 2025-11-07 14:32:30 -05:00 committed by Consolatis
parent c8167c8ee0
commit 6de18b9afd
2 changed files with 18 additions and 14 deletions

View file

@ -2626,20 +2626,6 @@ view_destroy(struct view *view)
undecorate(view);
view_set_icon(view, NULL, NULL);
/*
* The layer-shell top-layer is disabled when an application is running
* in fullscreen mode, so if that's the case, we may have to re-enable
* it here.
*/
if (view->fullscreen && view->output) {
view->fullscreen = false;
desktop_update_top_layer_visibility(server);
if (rc.adaptive_sync == LAB_ADAPTIVE_SYNC_FULLSCREEN) {
set_adaptive_sync_fullscreen(view);
}
}
menu_on_view_destroy(view);
/*