wayland: pointer-confinement: Listen to "geometry-changed" on the surface, not the actor

Commit b12c92e206 ("wayland: Add MetaWaylandSurface::geometry-changed signal")
Added a "geometry-changed" signal on MetaWaylandSurface, but the matching
changes to src/wayland/meta-pointer-confinement-wayland.c made it listen
for geometry-changed on the surface-actor instead of on the surface itself,
leading to errors like these:

gnome-shell[37805]: ../gobject/gsignal.c:2429: signal 'geometry-changed' is invalid for instance '0x5653aa7cfe50' of type 'MetaSurfaceActorWayland'

This commit fixes this.

Fixes: b12c92e206 ("wayland: Add MetaWaylandSurface::geometry-changed signal")

https://gitlab.gnome.org/GNOME/mutter/merge_requests/751
This commit is contained in:
Hans de Goede 2019-08-26 12:48:10 +02:00
parent 2b64861ee1
commit acbefa5263

View File

@ -674,8 +674,8 @@ meta_pointer_confinement_wayland_maybe_warp (MetaPointerConfinementWayland *self
}
static void
surface_actor_geometry_changed (MetaSurfaceActorWayland *surface_actor,
MetaPointerConfinementWayland *self)
surface_geometry_changed (MetaWaylandSurface *surface,
MetaPointerConfinementWayland *self)
{
meta_pointer_confinement_wayland_maybe_warp (self);
}
@ -700,9 +700,9 @@ meta_pointer_confinement_wayland_new (MetaWaylandPointerConstraint *constraint)
confinement->constraint = constraint;
surface = meta_wayland_pointer_constraint_get_surface (constraint);
g_signal_connect_object (meta_wayland_surface_get_actor (surface),
g_signal_connect_object (surface,
"geometry-changed",
G_CALLBACK (surface_actor_geometry_changed),
G_CALLBACK (surface_geometry_changed),
confinement,
0);
if (surface->window)