libweston-desktop: Fix configure event for already well-sized surfaces
Even if the surface size is already correct, we need to store the
configured size in case some other state change triggers a configure
event.
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
diff --git a/libweston-desktop/xdg-shell-v5.c b/libweston-desktop/xdg-shell-v5.c
index 83e5d30..14216b0 100644
--- a/libweston-desktop/xdg-shell-v5.c
+++ b/libweston-desktop/xdg-shell-v5.c
@@ -192,11 +192,13 @@
struct weston_desktop_xdg_surface *surface = user_data;
struct weston_surface *wsurface = weston_desktop_surface_get_surface(surface->surface);
- if (wsurface->width == width && wsurface->height == height)
- return;
-
surface->requested_size.width = width;
surface->requested_size.height = height;
+
+ if ((wsurface->width == width && wsurface->height == height) ||
+ (width == 0 && height == 0))
+ return;
+
weston_desktop_xdg_surface_schedule_configure(surface);
}