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
This commit is contained in:
Carlos Garnacho 2016-12-01 16:18:48 +01:00
parent 7f49b5144b
commit 5eb5f72434

View File

@ -1286,6 +1286,14 @@ surface_actor_painting (MetaSurfaceActorWayland *surface_actor,
meta_wayland_surface_update_outputs (surface); 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 * MetaWaylandSurface *
meta_wayland_surface_create (MetaWaylandCompositor *compositor, meta_wayland_surface_create (MetaWaylandCompositor *compositor,
struct wl_client *client, struct wl_client *client,
@ -1309,6 +1317,10 @@ meta_wayland_surface_create (MetaWaylandCompositor *compositor,
G_CALLBACK (surface_actor_painting), G_CALLBACK (surface_actor_painting),
surface, surface,
0); 0);
g_signal_connect_object (surface->surface_actor,
"notify::mapped",
G_CALLBACK (surface_actor_mapped_notify),
surface, 0);
sync_drag_dest_funcs (surface); sync_drag_dest_funcs (surface);