mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
00a3c69868
There is a race condition when we resize a stage before showing it on X11. The race goes like this: - clutter_init() creates the default stage and realize it, which will cause a 640x480 Window to be created - call set_size(800, 600) on the stage will cause the Window to be resized to 800x600 - call show() on the stage for the first time will cause COGL to set up an 800 by 600 GL viewport - the Window will be mapped, which will cause X to notify the window manager that the Window should be resized to 800x600 - the window manager will approve the resize - X resizes the drawable to 800x600 To fix the race, we need to defer COGL from setting up the viewport until we receive a ConfigureNotify event and the X server has resized the Drawable. In order to defer the call to cogl_setup_viewport() we add a new private flag, CLUTTER_STAGE_IN_RESIZE; the flag is checked whenever we need to change the viewport size along with the SYNC_MATRICES private flag. Thus, cogl_setup_viewport() will be called only if SYNC_MATRICES is set and IN_RESIZE is not set. |
||
---|---|---|
.. | ||
clutter-backend-x11-private.h | ||
clutter-backend-x11.c | ||
clutter-backend-x11.h | ||
clutter-event-x11.c | ||
clutter-stage-x11.c | ||
clutter-stage-x11.h | ||
clutter-x11-enum-types.c.in | ||
clutter-x11-enum-types.h.in | ||
clutter-x11-texture-pixmap.c | ||
clutter-x11-texture-pixmap.h | ||
clutter-x11.h | ||
clutter-x11.pc.in | ||
Makefile.am |