GNOME Bugzilla – Bug 704457
Setting the size of the stage causes it to not be shown on wayland
Last modified: 2013-08-13 10:45:44 UTC
If you set the size of the stage (via clutter_actor_set_size or clutter_stage_set_fullscreen) it causes the stage not to be shown on wayland. The attached simple program (which works as expected on X11) does not show the stage on Wayland. If you remove the clutter_actor_set_size line, it does show the stage. Versions of libraries being used are: Wayland - 6ef06ad06d0c32bff6bbd471a50a17bd7f92e0bc Weston - a684b5a3d59d5ff42c30e03fe75a857073fb3fd2 Cogl (1.16 branch) - 2f9a0a2c970b9a6bc41faa0cf01292d703acd047 Clutter (1.16 branch) - 697f7a335900d35ddff3e57b4d709bb613feef25
Created attachment 249491 [details] A test program
Rob, could you have a look at this?
Interesting .. calling clutter_actor_show (stage) before setting the size makes the problem go away.
on x11 the sizing and fullscreen mechanism is asynchronous, so it stores a bunch of state to be applied before creating resources on realize()+show(). it could be the case of the Wayland backend depending on having a realized stage before doing the sizing.
Created attachment 251395 [details] [review] wayland: When resizing only trigger a redraw if the stage has been shown This is necessary to avoid a deadlock with the compositor. When setting a stage size before the stage was shown this would trigger a redraw inside clutter_stage_wayland_resize. This redraw would result in a call into eglSwapBuffers which would attach a buffer to the surface and commit. Unfortunately this would happen before the role for the surface was set. This would result in the compositor not relaying to the client that the desired frame was shown. With this change the call to wl_shell_surface_set_toplevel is always made before the first redraw.
Review of attachment 251395 [details] [review]: looks good to me.
Attachment 251395 [details] pushed as 1afe757 - wayland: When resizing only trigger a redraw if the stage has been shown
*** Bug 702201 has been marked as a duplicate of this bug. ***