mirror of
https://github.com/brl/mutter.git
synced 2025-06-16 18:29:31 +00:00
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:

committed by
Robert Mader

parent
5149e1e43a
commit
c0c74484bc
@ -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);
|
||||
|
Reference in New Issue
Block a user