* potential issue of GL calls with no context)
*/
current_context_stage = stage;
-
- if (stage)
- CLUTTER_SET_PRIVATE_FLAGS (stage, CLUTTER_ACTOR_SYNC_MATRICES);
}
else
CLUTTER_NOTE (MULTISTAGE, "Stage is the same");
void
_clutter_stage_maybe_setup_viewport (ClutterStage *stage)
{
- if ((CLUTTER_PRIVATE_FLAGS (stage) & CLUTTER_ACTOR_SYNC_MATRICES) &&
- !(CLUTTER_PRIVATE_FLAGS (stage) & CLUTTER_STAGE_IN_RESIZE))
+ if (CLUTTER_PRIVATE_FLAGS (stage) & CLUTTER_ACTOR_SYNC_MATRICES)
{
ClutterPerspective perspective;
guint width, height;
*/
CLUTTER_ACTOR_IN_PAINT = 1 << 4, /* Used to avoid recursion */
CLUTTER_ACTOR_IN_RELAYOUT = 1 << 5, /* Used to avoid recursion */
- CLUTTER_TEXTURE_IN_CLONE_PAINT = 1 << 6, /* Used for safety in clones */
- CLUTTER_STAGE_IN_RESIZE = 1 << 7 /* Used to mark stage resizes */
+ CLUTTER_TEXTURE_IN_CLONE_PAINT = 1 << 6 /* Used for safety in clones */
} ClutterPrivateFlags;
typedef enum {
it from trying to resize the window again */
stage_x11->handling_configure = TRUE;
+ CLUTTER_NOTE (BACKEND, "%s: ConfigureNotify[%x] (%d, %d)",
+ G_STRLOC,
+ (unsigned int) stage_x11->xwin,
+ xevent->xconfigure.width,
+ xevent->xconfigure.height);
+
clutter_actor_set_size (CLUTTER_ACTOR (stage),
xevent->xconfigure.width,
xevent->xconfigure.height);
stage_x11->handling_configure = FALSE;
- /* the resize process is complete, so we can remove the
- * in-resize flag and allow the viewport to be resized
+ /* the resize process is complete, so we can ask the stage
+ * to set up the GL viewport with the new size
*/
- CLUTTER_UNSET_PRIVATE_FLAGS (CLUTTER_ACTOR (stage_x11->wrapper),
- CLUTTER_STAGE_IN_RESIZE);
+ CLUTTER_SET_PRIVATE_FLAGS (CLUTTER_ACTOR (stage_x11->wrapper),
+ CLUTTER_ACTOR_SYNC_MATRICES);
}
res = FALSE;
break;
!stage_x11->is_foreign_xwin &&
!stage_x11->handling_configure)
{
+ CLUTTER_NOTE (BACKEND, "%s: XResizeWindow[%x] (%d, %d)",
+ G_STRLOC,
+ (unsigned int) stage_x11->xwin,
+ stage_x11->xwin_width,
+ stage_x11->xwin_height);
+
XResizeWindow (stage_x11->xdpy,
stage_x11->xwin,
stage_x11->xwin_width,
stage_x11->xwin_height);
-
- /* resizing is an asynchronous process; to avoid races
- * with the window manager, we flag the wrapper as being
- * "in resize", so that the SYNC_MATRICES flag will not
- * cause a call to cogl_get_viewport().
- *
- * the flag is unset inside clutter-event-x11.c, after
- * we receive a ConfigureNotify event. XXX - need to
- * check what happens when running without a window manager
- */
- CLUTTER_SET_PRIVATE_FLAGS (CLUTTER_ACTOR (stage_x11->wrapper),
- CLUTTER_STAGE_IN_RESIZE);
}
- CLUTTER_SET_PRIVATE_FLAGS (CLUTTER_ACTOR (stage_x11->wrapper),
- CLUTTER_ACTOR_SYNC_MATRICES);
-
clutter_stage_x11_fix_window_size (stage_x11);
if (stage_x11->xpixmap != None)
if (!stage)
return;
+ CLUTTER_SET_PRIVATE_FLAGS (stage, CLUTTER_ACTOR_SYNC_MATRICES);
+
if (is_fullscreen)
{
int width, height;
stage_x11->fullscreen_on_map = FALSE;
}
}
-
- CLUTTER_SET_PRIVATE_FLAGS (stage, CLUTTER_ACTOR_SYNC_MATRICES);
}
static void
clutter_actor_set_geometry (actor, &geom);
clutter_actor_realize (actor);
+ CLUTTER_SET_PRIVATE_FLAGS (actor, CLUTTER_ACTOR_SYNC_MATRICES);
+
return TRUE;
}