diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2017-05-09 14:58:50 +0200 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2017-05-09 15:02:05 +0200 |
commit | 03c7b026685effb897aced7db4bbef8705e21338 (patch) | |
tree | 504b8b102d0b8659568cf9be8f1e96e06a000b53 | |
parent | 9196768696abcaabcbf38dd94b91e5be34a55d6d (diff) | |
download | clutter-03c7b026685effb897aced7db4bbef8705e21338.tar.gz |
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
-rw-r--r-- | 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 0a40a5ee2..4b90d5cff 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); } |