Bug 1442 - multistage, same-window resize events invalidate stage
When ensuring that the GL context is attached to the correct
ClutterStage we need to set the SYNC_MATRICES flag on the stage
itself. This is needed in case the size of the new stage does
not match the size of the old -- thus requiring a call to
glViewport() when the paint cycle starts.
* potential issue of GL calls with no context)
*/
current_context_stage = stage;
+
+ /* if the new stage has a different size than the previous one
+ * we need to update the viewport; we do it by simply setting the
+ * SYNC_MATRICES flag and letting the next redraw cycle take care
+ * of calling glViewport()
+ */
+ if (current_context_stage)
+ {
+ CLUTTER_SET_PRIVATE_FLAGS (current_context_stage,
+ CLUTTER_ACTOR_SYNC_MATRICES);
+ }
}
else
CLUTTER_NOTE (MULTISTAGE, "Stage is the same");