mirror of
https://github.com/brl/mutter.git
synced 2025-02-18 06:04:10 +00:00
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:
parent
69707e94a4
commit
c2d724a2cd
12
ChangeLog
12
ChangeLog
@ -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>
|
2006-11-30 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* Makefile.am: Remove the gtk directory from the SUBDIRS.
|
* Makefile.am: Remove the gtk directory from the SUBDIRS.
|
||||||
|
@ -71,6 +71,7 @@ struct _ClutterStagePrivate
|
|||||||
guint want_fullscreen : 1;
|
guint want_fullscreen : 1;
|
||||||
guint want_offscreen : 1;
|
guint want_offscreen : 1;
|
||||||
guint hide_cursor : 1;
|
guint hide_cursor : 1;
|
||||||
|
guint is_foreign_xwin : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@ -277,11 +278,13 @@ clutter_stage_unrealize (ClutterActor *actor)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (priv->xwin != None)
|
if (!priv->is_foreign_xwin && priv->xwin != None)
|
||||||
{
|
{
|
||||||
XDestroyWindow (clutter_xdisplay(), priv->xwin);
|
XDestroyWindow (clutter_xdisplay(), priv->xwin);
|
||||||
priv->xwin = None;
|
priv->xwin = None;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
priv->xwin = None;
|
||||||
}
|
}
|
||||||
|
|
||||||
glXMakeCurrent(clutter_xdisplay(), None, NULL);
|
glXMakeCurrent(clutter_xdisplay(), None, NULL);
|
||||||
@ -786,6 +789,8 @@ clutter_stage_init (ClutterStage *self)
|
|||||||
priv->want_offscreen = FALSE;
|
priv->want_offscreen = FALSE;
|
||||||
priv->want_fullscreen = FALSE;
|
priv->want_fullscreen = FALSE;
|
||||||
priv->hide_cursor = FALSE;
|
priv->hide_cursor = FALSE;
|
||||||
|
priv->is_foreign_xwin = FALSE;
|
||||||
|
|
||||||
priv->xwin = None;
|
priv->xwin = None;
|
||||||
priv->gl_context = None;
|
priv->gl_context = None;
|
||||||
|
|
||||||
@ -906,6 +911,7 @@ clutter_stage_set_xwindow_foreign (ClutterStage *stage,
|
|||||||
clutter_actor_unrealize (CLUTTER_ACTOR (stage));
|
clutter_actor_unrealize (CLUTTER_ACTOR (stage));
|
||||||
|
|
||||||
priv->xwin = xid;
|
priv->xwin = xid;
|
||||||
|
priv->is_foreign_xwin = TRUE;
|
||||||
|
|
||||||
geom.x = x;
|
geom.x = x;
|
||||||
geom.y = y;
|
geom.y = y;
|
||||||
@ -1137,17 +1143,3 @@ clutter_stage_get_actor_at_pos (ClutterStage *stage,
|
|||||||
|
|
||||||
return found;
|
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);
|
|
||||||
}
|
|
||||||
|
@ -125,7 +125,6 @@ GdkPixbuf * clutter_stage_snapshot (ClutterStage *stage,
|
|||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
const XVisualInfo * clutter_stage_get_xvisual (ClutterStage *stage);
|
const XVisualInfo * clutter_stage_get_xvisual (ClutterStage *stage);
|
||||||
void clutter_stage_swap_buffers (ClutterStage *stage);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user