[stage-x11] Ensure viewport is initialized before first stage paint
authorRobert Bragg <robert@linux.intel.com>
Tue, 20 Oct 2009 15:55:10 +0000 (16:55 +0100)
committerRobert Bragg <robert@linux.intel.com>
Mon, 2 Nov 2009 16:55:02 +0000 (16:55 +0000)
commitf8f8873714043efbcbf92718493a94ac9ddf303f
treeef208a5488d02cf71508bd46607c83eeee63935a
parentad98e96d977e43a882b8a2f680e59ed281c90baf
[stage-x11] Ensure viewport is initialized before first stage paint

This ensures that glViewport is called before the first stage paint.
Previously _clutter_stage_maybe_setup_viewport (which is done before we
start painting) was bailing out without calling cogl_setup_viewport because
the CLUTTER_STAGE_IN_RESIZE flag may be set if the stage was resized before
the first paint.  (NB: The CLUTTER_STAGE_IN_RESIZE flag isn't removed until
we get an explicit event back from the X server since the window manager may
choose to deny/alter the resize.)

We now special case the first resize - where the viewport hasn't previously
been initialized and use the requested geometry to initialize the
glViewport without waiting for a reply from the server.
clutter/x11/clutter-stage-x11.c
clutter/x11/clutter-stage-x11.h