Skip to content
Commit 11fecf08 authored by Daniel Stone's avatar Daniel Stone
Browse files

xdg-shell: Make xdg_surface fail when surface has role



It is illegal for a surface to have more than one role. The only thing
which can be done with an xdg_surface (apart from destroying it) is to
assign the surface a role with the get_toplevel, get_popup, etc
requests.

On Mutter, calling get_xdg_surface on a surface which already has an
assigned role generates the 'role' protocol error. Weston will not send
an error, however it may later abort on a failed assert during cleanup.
wlroots allows this case, and only sends the role error when assigning
an explicit role through creating a toplevel or popup.

On the grounds that it makes no sense to create an xdg_surface for a
wl_surface which already has a role, make it explicitly illegal.

cf. weston!559, weston!627

Signed-off-by: default avatarDaniel Stone <daniels@collabora.com>
parent 36cee4bd
Loading
Loading
Loading
Pipeline #364295 passed with stages
in 35 seconds
Loading
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