xdg-shell: clarify whether configure events can/must be sent before the initial surface commit
Consider the following sequence of events:
wl_compositor.create_surface()
xdg_wm_base.get_xdg_surface()
xdg_surface.get_toplevel()
[wl_display.sync()]
xdg_toplevel.set_maximized() // 1
[wl_display.sync()]
xdg_toplevel_set_maximized() // 2
[wl_display.sync()]
xdg_toplevel.set_fullscreen() // 3
[wl_display.sync()]
As stated by the protocol, upon receiving any of those requests "the compositor will respond by emitting a configure event". However, at this point no wl_surface.commit
has been sent, suggesting that the client hasn't finished setting the surface up yet.
As the usefulness of sending configure events to a partially initialized surface is unclear, compositor implementations handle this differently:
- wlroots and KWin don't reply to the requests at all;
- Mutter replies to requests 1 and 3 (with
xdg_toplevel.configure
too); - Weston replies to requests 1, 2, and 3 (with
xdg_toplevel.configure
too).
This also applies to zxdg_toplevel_decoration_v1.set_mode
request.
Semi-related: #106 (closed)