[clutter] gdk: stage: destroy and clear subsurface on unrealize()
- From: Olivier Fourdan <ofourdan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] gdk: stage: destroy and clear subsurface on unrealize()
- Date: Tue, 9 May 2017 13:06:33 +0000 (UTC)
commit 03c7b026685effb897aced7db4bbef8705e21338
Author: Olivier Fourdan <ofourdan redhat com>
Date: Tue May 9 14:58:50 2017 +0200
gdk: stage: destroy and clear subsurface on unrealize()
When using a gdk subsurface, destroy it on clutter_stage_gdk_unrealize()
to avoid keeping around an old existing subsurface pointing to a parent
surface which might be gone.
https://bugzilla.gnome.org/show_bug.cgi?id=781975
clutter/gdk/clutter-stage-gdk.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/clutter/gdk/clutter-stage-gdk.c b/clutter/gdk/clutter-stage-gdk.c
index 0a40a5e..4b90d5c 100644
--- a/clutter/gdk/clutter-stage-gdk.c
+++ b/clutter/gdk/clutter-stage-gdk.c
@@ -208,6 +208,15 @@ clutter_stage_gdk_unrealize (ClutterStageWindow *stage_window)
stage_gdk->window = NULL;
}
+#if defined(GDK_WINDOWING_WAYLAND) && defined(COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT)
+ /* Destroy and clear subsurface as well */
+ if (GDK_IS_WAYLAND_WINDOW (stage_gdk->subsurface))
+ {
+ gdk_window_destroy (stage_gdk->subsurface);
+ stage_gdk->subsurface = NULL;
+ }
+#endif
+
clutter_stage_window_parent_iface->unrealize (stage_window);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]