diff --git a/libweston-desktop/xdg-shell-v5.c b/libweston-desktop/xdg-shell-v5.c index d7c49b15..77d004e1 100644 --- a/libweston-desktop/xdg-shell-v5.c +++ b/libweston-desktop/xdg-shell-v5.c @@ -264,6 +264,10 @@ weston_desktop_xdg_surface_committed(struct weston_desktop_surface *dsurface, weston_desktop_surface_get_surface(surface->surface); bool reconfigure = false; + /* TODO: use the window geometry and not the surface size here + * We need to check the next geometry if there is one, but not accept it + * until we checked it, maybe. + */ if (surface->next.state.maximized || surface->next.state.fullscreen) reconfigure = surface->next.size.width != wsurface->width || surface->next.size.height != wsurface->height; diff --git a/libweston-desktop/xdg-shell-v6.c b/libweston-desktop/xdg-shell-v6.c index dda0bf92..1344dda0 100644 --- a/libweston-desktop/xdg-shell-v6.c +++ b/libweston-desktop/xdg-shell-v6.c @@ -644,9 +644,12 @@ weston_desktop_xdg_toplevel_committed(struct weston_desktop_xdg_toplevel *toplev if (!wsurface->buffer_ref.buffer) return; + struct weston_geometry geometry = + weston_desktop_surface_get_geometry(toplevel->base.desktop_surface); + if ((toplevel->next.state.maximized || toplevel->next.state.fullscreen) && - (toplevel->next.size.width != wsurface->width || - toplevel->next.size.height != wsurface->height)) { + (toplevel->next.size.width != geometry.width || + toplevel->next.size.height != geometry.height)) { struct weston_desktop_client *client = weston_desktop_surface_get_client(toplevel->base.desktop_surface); struct wl_resource *client_resource =