GNOME Bugzilla – Bug 664497
clutter-stage-x11: Set geometry after a resize
Last modified: 2012-01-24 12:34:48 UTC
This is required if we want to stop using the default stage in Clutter.
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.
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.
since mutter and gnome-shell don't seem to be using the default stage any more, I guess we can close this bug.