Skip to content
Snippets Groups Projects
Commit 3acad73c authored by Mike Blumenkrantz's avatar Mike Blumenkrantz Committed by Jonas Ådahl
Browse files

xdg-shell: clarify xdg_surface creation semantics regarding buffers


this change ensures that the client will set its initial state
before performing any drawing, ensuring that there is no mismatch
when creating a surface with a non-default state
(eg. maximize, fullscreen, ...)

looking at the following event flows:
1) wl_surface.attach, wl_surface.commit, xdg_shell.get_xdg_surface

2) wl_surface.attach, xdg_shell.get_xdg_surface, wl_surface.commit

3) xdg_shell.get_xdg_surface, wl_surface.commit, xdg_surface.configure,
   wl_surface.attach, wl_surface.commit

only 3) is now valid, while 1) and 2) will trigger errors as a result
of handling buffers prior to creating the xdg surface

Signed-off-by: default avatarMike Blumenkrantz <zmike@osg.samsung.com>
Signed-off-by: default avatarJonas Ådahl <jadahl@gmail.com>
Reviewed-by: default avatarJasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: default avatarBryce Harrington <bryce@osg.samsung.com>
parent 57592798
No related branches found
No related tags found
No related merge requests found
...@@ -126,14 +126,12 @@ ...@@ -126,14 +126,12 @@
them, and associate metadata like title and app id. them, and associate metadata like title and app id.
The client must call wl_surface.commit on the corresponding wl_surface The client must call wl_surface.commit on the corresponding wl_surface
for the xdg_surface state to take effect. Prior to committing the new for the xdg_surface state to take effect.
state, it can set up initial configuration, such as maximizing or setting
a window geometry. Creating an xdg_surface from a wl_surface which has a buffer attached or
committed is a client error, and any attempts by a client to attach or
Even without attaching a buffer the compositor must respond to initial manipulate a buffer prior to the first xdg_surface.configure call must
committed configuration, for instance sending a configure event with also be treated as errors.
expected window geometry if the client maximized its surface during
initialization.
For a surface to be mapped by the compositor the client must have For a surface to be mapped by the compositor the client must have
committed both an xdg_surface state and a buffer. committed both an xdg_surface state and a buffer.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment