mutter/clutter/x11
Emmanuele Bassi 00a3c69868 [x11] Fix a race condition when resizing a stage
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.
2009-01-09 12:06:46 +00:00
..
clutter-backend-x11-private.h 2008-01-31 Rob Bradford <rob@openedhand.com> 2008-01-31 11:24:11 +00:00
clutter-backend-x11.c Bug 1397 - Allow localizing the command line help 2009-01-06 12:15:02 +00:00
clutter-backend-x11.h 2008-07-01 Matthew Allum <mallum@openedhand.com> 2008-07-01 13:41:23 +00:00
clutter-event-x11.c [x11] Fix a race condition when resizing a stage 2009-01-09 12:06:46 +00:00
clutter-stage-x11.c [x11] Fix a race condition when resizing a stage 2009-01-09 12:06:46 +00:00
clutter-stage-x11.h 2008-06-23 Matthew Allum <mallum@openedhand.com> 2008-06-23 09:55:42 +00:00
clutter-x11-enum-types.c.in 2008-06-30 Emmanuele Bassi <ebassi@openedhand.com> 2008-06-30 15:03:42 +00:00
clutter-x11-enum-types.h.in 2008-06-30 Emmanuele Bassi <ebassi@openedhand.com> 2008-06-30 15:03:42 +00:00
clutter-x11-texture-pixmap.c 2008-11-07 Matthew Allum <mallum@linux.intel.com> 2008-11-07 16:31:56 +00:00
clutter-x11-texture-pixmap.h 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com> 2008-10-30 17:04:34 +00:00
clutter-x11.h 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com> 2008-10-30 17:04:34 +00:00
clutter-x11.pc.in 2008-01-23 Emmanuele Bassi <ebassi@openedhand.com> 2008-01-23 11:08:39 +00:00
Makefile.am 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com> 2008-10-30 17:04:34 +00:00