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 664497 - clutter-stage-x11: Set geometry after a resize
clutter-stage-x11: Set geometry after a resize
Status: RESOLVED INVALID
Product: clutter
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks: 664028
 
 
Reported: 2011-11-21 20:23 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2012-01-24 12:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
clutter-stage-x11: Set geometry after a resize (10.70 KB, patch)
2011-11-21 20:23 UTC, Jasper St. Pierre (not reading bugmail)
rejected Details | Review

Description Jasper St. Pierre (not reading bugmail) 2011-11-21 20:23:46 UTC
This is required if we want to stop using the default stage in Clutter.
Comment 1 Jasper St. Pierre (not reading bugmail) 2011-11-21 20:23:48 UTC
Created attachment 201859 [details] [review]
clutter-stage-x11: Set geometry after a resize

When a window manager is not running, or being replaced, we can't
rely on a ConfigureNotify.
Comment 2 Emmanuele Bassi (:ebassi) 2011-12-01 10:49:45 UTC
Review of attachment 201859 [details] [review]:

the patch won't work, as it breaks the correct sequence of operations that we have to perform on X11:  XResizeWindow -> X server negotiates the size with the Window Manager -> X server resizes the Drawable -> X server tells GLX to resize the backing buffer -> X server emits the ConfigureNotify for the client to catch -> the GLX client can make the Drawable current to the GLX context, and resize the GL viewport with the new buffer size.

we cannot get out of this sequence without getting garbage on the screen, or getting assertion failures in hard to debug edge cases; it took us ages to get this sequence right.

a potential way out is for mutter/gnome-shell to emit a synthetic ConfigureNotify by itself with the new size in case there is no Window Manager.

::: clutter/x11/clutter-stage-x11.c
@@ +379,3 @@
                          height);
+
+          clutter_stage_x11_set_size (stage_x11,

setting the size prior to a ConfigureNotify leads to changing the viewport before the X server is able to resize the GLX buffer; this will lead to an out-of-sync GLX drawable resize, which is incorrect. that's the whole reason for this machinery: we need to wait until the X server signals us that the underlying drawable has been resized before we can actively modify the GL state machine.
Comment 3 Emmanuele Bassi (:ebassi) 2012-01-24 12:34:48 UTC
since mutter and gnome-shell don't seem to be using the default stage any more, I guess we can close this bug.