libweston/desktop/xwayland: Add MINIMZE state change

This is identical to MAXIMIZE side where we change the state to
MAXIMIZE, and implicitly go through a state surface check.

For XWAYLAND type of windows (non weston_desktop_surface)
that surface state check will be needed. This is a temporary work-around
to avoid Weston crashing as some X11 Window types will hit this path.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2025-10-02 08:43:46 +03:00
parent cb17b87a65
commit 2497377af4

View file

@ -41,6 +41,7 @@ enum weston_desktop_xwayland_surface_state {
NONE,
TOPLEVEL,
MAXIMIZED,
MINIMIZED,
FULLSCREEN,
TRANSIENT,
XWAYLAND,
@ -450,6 +451,7 @@ set_maximized(struct weston_desktop_xwayland_surface *surface)
{
weston_desktop_xwayland_surface_change_state(surface, MAXIMIZED, NULL,
NULL);
weston_desktop_api_maximized_requested(surface->desktop,
surface->surface, true);
}
@ -457,6 +459,9 @@ set_maximized(struct weston_desktop_xwayland_surface *surface)
static void
set_minimized(struct weston_desktop_xwayland_surface *surface)
{
weston_desktop_xwayland_surface_change_state(surface, MINIMIZED, NULL,
NULL);
weston_desktop_api_minimized_requested(surface->desktop,
surface->surface);
}