From 19e3c216679a232de3e773fd7624c9eb0253d352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 3 Dec 2018 17:04:42 +0100 Subject: [PATCH] wayland/surface: Don't make destoryed actor reactive When destructing a xdg_toplevel, we'll disassociate the actor from the MetaWaylandSurface, to allow it to animate out. After having done this, avoid trying to set it as unreactive when unsetting the window. This fixes the runtime warning: clutter_actor_set_reactive: assertion 'CLUTTER_IS_ACTOR (actor)' failed --- src/wayland/meta-wayland-surface.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 26ee4c256..834d7c8a8 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -1226,6 +1226,7 @@ meta_wayland_surface_set_window (MetaWaylandSurface *surface, MetaWindow *window) { gboolean was_unmapped = surface->window && !window; + ClutterActor *actor; if (surface->window == window) return; @@ -1242,7 +1243,10 @@ meta_wayland_surface_set_window (MetaWaylandSurface *surface, surface->window = window; - clutter_actor_set_reactive (CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface)), !!window); + actor = CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface)); + if (actor) + clutter_actor_set_reactive (actor, !!window); + sync_drag_dest_funcs (surface); if (was_unmapped)