After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 704457 - Setting the size of the stage causes it to not be shown on wayland
Setting the size of the stage causes it to not be shown on wayland
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: wayland
1.15.x
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
: 702201 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-07-18 11:34 UTC by iain
Modified: 2013-08-13 10:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A test program (914 bytes, text/plain)
2013-07-18 11:38 UTC, iain
  Details
wayland: When resizing only trigger a redraw if the stage has been shown (2.72 KB, patch)
2013-08-12 16:46 UTC, Rob Bradford
committed Details | Review

Description iain 2013-07-18 11:34:03 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
Comment 1 iain 2013-07-18 11:38:58 UTC
Created attachment 249491 [details]
A test program
Comment 2 Emmanuele Bassi (:ebassi) 2013-07-18 11:42:16 UTC
Rob, could you have a look at this?
Comment 3 Rob Bradford 2013-07-18 12:14:30 UTC
Interesting .. calling clutter_actor_show (stage) before setting the size makes the problem go away.
Comment 4 Emmanuele Bassi (:ebassi) 2013-07-18 12:51:37 UTC
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.
Comment 5 Rob Bradford 2013-08-12 16:46:34 UTC
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.
Comment 6 Emmanuele Bassi (:ebassi) 2013-08-12 17:26:55 UTC
Review of attachment 251395 [details] [review]:

looks good to me.
Comment 7 Rob Bradford 2013-08-12 18:13:18 UTC
Attachment 251395 [details] pushed as 1afe757 - wayland: When resizing only trigger a redraw if the stage has been shown
Comment 8 Rob Bradford 2013-08-13 10:45:44 UTC
*** Bug 702201 has been marked as a duplicate of this bug. ***