2006-11-30 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-stage.h:
	* clutter/clutter-stage.c:
	(clutter_stage_swap_buffers): Remove, as the same is done
	via clutter_redraw() and clutter_actor_queue_redraw().

	(clutter_stage_unrealize), (clutter_stage_init),
	(clutter_stage_set_xwindow_foreign): Do not call
	XDestroyWindow() on the stage Window if we are using a
	foreign Window, as we don't control its lifetime.
This commit is contained in:
Emmanuele Bassi 2006-11-30 14:45:19 +00:00
parent 69707e94a4
commit c2d724a2cd
3 changed files with 19 additions and 16 deletions

View File

@ -1,3 +1,15 @@
2006-11-30 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-stage.h:
* clutter/clutter-stage.c:
(clutter_stage_swap_buffers): Remove, as the same is done
via clutter_redraw() and clutter_actor_queue_redraw().
(clutter_stage_unrealize), (clutter_stage_init),
(clutter_stage_set_xwindow_foreign): Do not call
XDestroyWindow() on the stage Window if we are using a
foreign Window, as we don't control its lifetime.
2006-11-30 Emmanuele Bassi <ebassi@openedhand.com>
* Makefile.am: Remove the gtk directory from the SUBDIRS.

View File

@ -71,6 +71,7 @@ struct _ClutterStagePrivate
guint want_fullscreen : 1;
guint want_offscreen : 1;
guint hide_cursor : 1;
guint is_foreign_xwin : 1;
};
enum
@ -277,11 +278,13 @@ clutter_stage_unrealize (ClutterActor *actor)
}
else
{
if (priv->xwin != None)
if (!priv->is_foreign_xwin && priv->xwin != None)
{
XDestroyWindow (clutter_xdisplay(), priv->xwin);
priv->xwin = None;
}
else
priv->xwin = None;
}
glXMakeCurrent(clutter_xdisplay(), None, NULL);
@ -786,6 +789,8 @@ clutter_stage_init (ClutterStage *self)
priv->want_offscreen = FALSE;
priv->want_fullscreen = FALSE;
priv->hide_cursor = FALSE;
priv->is_foreign_xwin = FALSE;
priv->xwin = None;
priv->gl_context = None;
@ -906,6 +911,7 @@ clutter_stage_set_xwindow_foreign (ClutterStage *stage,
clutter_actor_unrealize (CLUTTER_ACTOR (stage));
priv->xwin = xid;
priv->is_foreign_xwin = TRUE;
geom.x = x;
geom.y = y;
@ -1137,17 +1143,3 @@ clutter_stage_get_actor_at_pos (ClutterStage *stage,
return found;
}
void
clutter_stage_swap_buffers (ClutterStage *stage)
{
ClutterStagePrivate *priv;
ClutterMainContext *context;
g_return_if_fail (CLUTTER_IS_STAGE (stage));
priv = stage->priv;
context = clutter_context_get_default ();
glXSwapBuffers (context->xdpy, stage->priv->xwin);
}

View File

@ -125,7 +125,6 @@ GdkPixbuf * clutter_stage_snapshot (ClutterStage *stage,
gint width,
gint height);
const XVisualInfo * clutter_stage_get_xvisual (ClutterStage *stage);
void clutter_stage_swap_buffers (ClutterStage *stage);
G_END_DECLS