weston/libweston/desktop
Robert Mader 609dc4baa3 xdg-shell: Gate all configure events behind first commit
The protocol requires clients to perform an initial commit before they
receive configure events:
> After creating a role-specific object and setting it up (e.g. by sending
> the title, app ID, size constraints, parent, etc), the client must
> perform an initial commit without any buffer attached. The compositor
> will reply with initial wl_surface state such as
> wl_surface.preferred_buffer_scale followed by an xdg_surface.configure
> event. The client must acknowledge it and is then allowed to attach a
> buffer to map the surface.

Previous to this patch various calls such as set_fullscreen() or
set_maximized() would schedule configure events, resulting in clients
being able skip the initial commit. This again made it possible to write
clients that only work on Weston, in violation of the protocol.

For xdg-popups we already tracked the initial commit status. Move it
to xdg-surface, guard schedule_configure() on it and ensure to run the
later on the initial commit.

Incorporate tests that checks if we get configure events when calling
set_fullscreen/set_maximized and tests that uses the main xdg_surface as
a parent to a sub-surface (which initially triggered this issue).

Signed-off-by: Robert Mader <robert.mader@collabora.com>
2026-01-06 12:21:29 +02:00
..
client.c libweston/desktop: Update my Copyright 2024-02-11 19:07:39 +01:00
internal.h libweston-desktop: Break grabs when a parent surface is destroyed 2024-05-21 13:21:35 -05:00
libweston-desktop.c Revert "shared/helpers.h: Migrate helpers.h to libweston" 2025-01-17 10:18:26 +02:00
meson.build Move libweston-desktop into libweston 2022-06-28 10:35:52 +00:00
seat.c libweston-desktop: Break grabs when a parent surface is destroyed 2024-05-21 13:21:35 -05:00
surface.c desktop-shell: Remove weston_view_damage_below from desktop_view_destroy 2025-05-30 11:38:47 +00:00
xdg-shell-v6.c libweston/desktop: Avoid a potential crash on invalid resource 2024-10-21 11:14:48 +03:00
xdg-shell.c xdg-shell: Gate all configure events behind first commit 2026-01-06 12:21:29 +02:00
xwayland.c libweston/desktop/xwayland: Add MINIMZE state change 2025-10-02 08:43:46 +03:00