view: add client_request flag to view->impl->unmap()

This makes explicit the subtle behavioral difference between
xwayland_view_unmap() and handle_unmap().

With this change, the XDG and XWayland versions of handle_map/unmap()
are now identical, which will make further refactoring possible.
This commit is contained in:
John Lindgren 2023-07-01 12:37:47 -04:00 committed by Consolatis
parent b200dd2e7b
commit 370cdc80e0
4 changed files with 22 additions and 18 deletions

View file

@ -151,7 +151,7 @@ static void
handle_unmap(struct wl_listener *listener, void *data)
{
struct view *view = wl_container_of(listener, view, unmap);
view->impl->unmap(view);
view->impl->unmap(view, /* client_request */ true);
}
static void
@ -452,7 +452,7 @@ xdg_toplevel_view_map(struct view *view)
}
static void
xdg_toplevel_view_unmap(struct view *view)
xdg_toplevel_view_unmap(struct view *view, bool client_request)
{
if (view->mapped) {
view->mapped = false;