wayland: Don't access MetaWaylandSurface::window directly

It'll be moved to the role owning it, accessed via a helper function
implemented by the role. Currently it still just fetches the field in
MetaWaylandSurface.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/835
This commit is contained in:
Jonas Ådahl
2019-10-09 09:37:04 +02:00
committed by Robert Mader
parent 5149e1e43a
commit c0c74484bc
17 changed files with 198 additions and 126 deletions

View File

@ -696,6 +696,7 @@ meta_pointer_confinement_wayland_new (MetaWaylandPointerConstraint *constraint)
GObject *object;
MetaPointerConfinementWayland *confinement;
MetaWaylandSurface *surface;
MetaWindow *window;
object = g_object_new (META_TYPE_POINTER_CONFINEMENT_WAYLAND, NULL);
confinement = META_POINTER_CONFINEMENT_WAYLAND (object);
@ -708,9 +709,11 @@ meta_pointer_confinement_wayland_new (MetaWaylandPointerConstraint *constraint)
G_CALLBACK (surface_geometry_changed),
confinement,
0);
if (surface->window)
window = meta_wayland_surface_get_window (surface);
if (window)
{
g_signal_connect_object (surface->window,
g_signal_connect_object (window,
"position-changed",
G_CALLBACK (window_position_changed),
confinement,