diff --git a/ChangeLog b/ChangeLog index 8a5d22211..215c9c787 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-12-03 Øyvind Kolås + + * clutter/glx/clutter-stage-glx.c: for extra sanity, set + stage_x11->xvisinfo = NULL after XFree. Makes using the root window + as foreign window possible. + 2007-11-30 Øyvind Kolås * clutter/clutter-timeline.c: (clutter_timeline_get_delta): return the diff --git a/clutter/glx/clutter-stage-glx.c b/clutter/glx/clutter-stage-glx.c index d74b8e1da..eec87593b 100644 --- a/clutter/glx/clutter-stage-glx.c +++ b/clutter/glx/clutter-stage-glx.c @@ -125,11 +125,13 @@ clutter_stage_glx_realize (ClutterActor *actor) }; if (stage_x11->xvisinfo) - XFree (stage_x11->xvisinfo); + XFree (stage_x11->xvisinfo); + stage_x11->xvisinfo = NULL; + /* The following check seems strange */ if (stage_x11->xvisinfo == None) stage_x11->xvisinfo = glXChooseVisual (stage_x11->xdpy, - stage_x11->xscreen, + stage_x11->xscreen, gl_attributes); if (!stage_x11->xvisinfo) { @@ -216,8 +218,9 @@ clutter_stage_glx_realize (ClutterActor *actor) 0 }; - if (stage_x11->xvisinfo) - XFree (stage_x11->xvisinfo); + if (stage_x11->xvisinfo ) + XFree (stage_x11->xvisinfo); + stage_x11->xvisinfo = NULL; CLUTTER_NOTE (GL, "glXChooseVisual"); stage_x11->xvisinfo = glXChooseVisual (stage_x11->xdpy,