[mutter] wayland: disconnect mapped signal handler on destroy



commit 1ab6ac2996bf31aed5ff92351046b462905110e1
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Tue Dec 13 11:32:16 2016 +0100

    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 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 1b4e8bb..fcbdc7d 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -173,6 +173,11 @@ meta_wayland_surface_role_shell_surface_managed (MetaWaylandSurfaceRoleShellSurf
                                                  MetaWindow                         *window);
 
 static void
+surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor,
+                             GParamSpec              *pspec,
+                             MetaWaylandSurface      *surface);
+
+static void
 unset_param_value (GParameter *param)
 {
   g_value_unset (&param->value);
@@ -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);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]