From 5eb5f724347ae8d141ef38b36565169c60c53ab1 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 1 Dec 2016 16:18:48 +0100 Subject: [PATCH] wayland: Check surface outputs after mapped state changes So they consistently receive wl_surface.leave after the surface is not visible anymore. https://bugzilla.gnome.org/show_bug.cgi?id=775478 --- src/wayland/meta-wayland-surface.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index b780c0fdc..1b4e8bb9d 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -1286,6 +1286,14 @@ surface_actor_painting (MetaSurfaceActorWayland *surface_actor, meta_wayland_surface_update_outputs (surface); } +static void +surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor, + GParamSpec *pspec, + MetaWaylandSurface *surface) +{ + meta_wayland_surface_update_outputs (surface); +} + MetaWaylandSurface * meta_wayland_surface_create (MetaWaylandCompositor *compositor, struct wl_client *client, @@ -1309,6 +1317,10 @@ meta_wayland_surface_create (MetaWaylandCompositor *compositor, G_CALLBACK (surface_actor_painting), surface, 0); + g_signal_connect_object (surface->surface_actor, + "notify::mapped", + G_CALLBACK (surface_actor_mapped_notify), + surface, 0); sync_drag_dest_funcs (surface);