view: less hacky support for minimize-before-map

The previous "minimal fix" (5148c2aa31) worked but was a bit of a
hack, as it basically un-minimized and then immediately minimized the
view again at map. It's not actually too difficult to make the map
handlers aware of minimized views, eliminating the need for the hack.

Note: this depends on the previous commit ("xwayland: connect commit
and surface_destroy handlers together") otherwise the xwayland map
handler registers the commit handler twice, leading to a crash.
This commit is contained in:
John Lindgren 2025-11-07 22:38:32 -05:00 committed by Johan Malm
parent b6f7bacdde
commit 79fbb611e0
5 changed files with 26 additions and 20 deletions

View file

@ -18,7 +18,6 @@ struct foreign_toplevel *
foreign_toplevel_create(struct view *view)
{
assert(view);
assert(view->mapped);
struct foreign_toplevel *toplevel = znew(*toplevel);
wlr_foreign_toplevel_init(&toplevel->wlr_toplevel, view);