From 1ab6ac2996bf31aed5ff92351046b462905110e1 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 13 Dec 2016 11:32:16 +0100 Subject: [PATCH] wayland: disconnect mapped signal handler on destroy Commit 5eb5f72 - wayland: Check surface outputs after mapped state changes connected the ::mapped signal handler, we need to disconnect it on destroy to avoid a possible assertion failure in update_surface_output_state() https://bugzilla.gnome.org/show_bug.cgi?id=776036 --- src/wayland/meta-wayland-surface.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 1b4e8bb9d..fcbdc7d00 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -172,6 +172,11 @@ static void meta_wayland_surface_role_shell_surface_managed (MetaWaylandSurfaceRoleShellSurface *shell_surface_role, MetaWindow *window); +static void +surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor, + GParamSpec *pspec, + MetaWaylandSurface *surface); + static void unset_param_value (GParameter *param) { @@ -406,6 +411,10 @@ meta_wayland_surface_destroy_window (MetaWaylandSurface *surface) MetaDisplay *display = meta_get_display (); guint32 timestamp = meta_display_get_current_time_roundtrip (display); + g_signal_handlers_disconnect_by_func (surface->surface_actor, + surface_actor_mapped_notify, + surface); + meta_window_unmanage (surface->window, timestamp); }