view: handle initially minimized views (minimal fix)

The view->impl functions do not directly support mapping a view while
minimized. Instead, mark it as not minimized, map it, and then minimize
it again.

Fixes: #2627
This commit is contained in:
John Lindgren 2025-04-23 12:03:20 -04:00 committed by Johan Malm
parent f0c7277c4a
commit 5148c2aa31

View file

@ -2436,7 +2436,18 @@ static void
handle_map(struct wl_listener *listener, void *data)
{
struct view *view = wl_container_of(listener, view, mappable.map);
view->impl->map(view);
if (view->minimized) {
/*
* The view->impl functions do not directly support
* mapping a view while minimized. Instead, mark it as
* not minimized, map it, and then minimize it again.
*/
view->minimized = false;
view->impl->map(view);
view_minimize(view, true);
} else {
view->impl->map(view);
}
}
static void