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

@ -927,6 +927,7 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
{
struct wl_client *client = wl_resource_get_client (surface->resource);
graphene_point_t pos;
MetaWindow *focus_window;
pointer->focus_surface = surface;
@ -937,8 +938,9 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
clutter_input_device_get_coords (pointer->device, NULL, &pos);
if (pointer->focus_surface->window)
meta_window_handle_enter (pointer->focus_surface->window,
focus_window = meta_wayland_surface_get_window (pointer->focus_surface);
if (focus_window)
meta_window_handle_enter (focus_window,
/* XXX -- can we reliably get a timestamp for setting focus? */
clutter_get_current_event_time (),
pos.x, pos.y);