static void clutter_stage_glx_unrealize (ClutterStageWindow *stage_window) { ClutterBackend *backend = clutter_get_default_backend (); ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (backend); ClutterStageX11 *stage_x11 = CLUTTER_STAGE_X11 (stage_window); ClutterStageGLX *stage_glx = CLUTTER_STAGE_GLX (stage_window); /* Note unrealize should free up any backend stage related resources */ CLUTTER_NOTE (BACKEND, "Unrealizing stage"); clutter_x11_trap_x_errors (); if (stage_glx->glxwin != None) { glXDestroyWindow (backend_x11->xdpy, stage_glx->glxwin); stage_glx->glxwin = None; } if (!stage_x11->is_foreign_xwin && stage_x11->xwin != None) { XDestroyWindow (backend_x11->xdpy, stage_x11->xwin); stage_x11->xwin = None; } else stage_x11->xwin = None; XSync (backend_x11->xdpy, False); clutter_x11_untrap_x_errors (); CLUTTER_MARK (); }
static void clutter_stage_egl_unrealize (ClutterActor *actor) { ClutterStageEGL *stage_egl = CLUTTER_STAGE_EGL (actor); CLUTTER_MARK(); if (CLUTTER_ACTOR_CLASS (clutter_stage_egl_parent_class)->unrealize != NULL) CLUTTER_ACTOR_CLASS (clutter_stage_egl_parent_class)->unrealize (actor); if (stage_egl->egl_surface) { eglDestroySurface (clutter_egl_display (), stage_egl->egl_surface); stage_egl->egl_surface = EGL_NO_SURFACE; } }