clutter: Drop clutter_input_device_get_coords() method

This is not device state anymore. It uses ClutterSeat API underneath,
so let callers do that instead.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>
This commit is contained in:
Carlos Garnacho
2020-11-18 15:49:02 +01:00
committed by Marge Bot
parent efc1592d4d
commit c6849a66e8
12 changed files with 24 additions and 48 deletions

View File

@ -63,7 +63,7 @@ meta_pointer_lock_wayland_create_constraint (MetaPointerConfinementWayland *conf
cairo_region_t *region;
float sx, sy, x, y;
clutter_input_device_get_coords (pointer, NULL, &point);
clutter_seat_query_state (seat, pointer, NULL, &point, NULL);
wayland_constraint =
meta_pointer_confinement_wayland_get_wayland_pointer_constraint (confinement);
surface = meta_wayland_pointer_constraint_get_surface (wayland_constraint);

View File

@ -198,7 +198,8 @@ meta_wayland_cursor_surface_is_on_logical_monitor (MetaWaylandSurfaceRole *role,
meta_rectangle_to_graphene_rect (&logical_monitor->rect);
device = meta_cursor_renderer_get_input_device (priv->cursor_renderer);
clutter_input_device_get_coords (device, NULL, &point);
clutter_seat_query_state (clutter_input_device_get_seat (device),
device, NULL, &point, NULL);
return graphene_rect_contains_point (&logical_monitor_rect, &point);
}

View File

@ -641,7 +641,8 @@ meta_wayland_data_device_start_drag (MetaWaylandDataDevice *data
0, 0);
clutter_actor_add_child (drag_grab->feedback_actor, drag_surface_actor);
clutter_input_device_get_coords (seat->pointer->device, NULL, &pos);
clutter_seat_query_state (clutter_input_device_get_seat (seat->pointer->device),
seat->pointer->device, NULL, &pos, NULL);
meta_feedback_actor_set_position (META_FEEDBACK_ACTOR (drag_grab->feedback_actor),
pos.x, pos.y);
}

View File

@ -949,7 +949,8 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
G_CALLBACK (focus_surface_destroyed),
pointer);
clutter_input_device_get_coords (pointer->device, NULL, &pos);
clutter_seat_query_state (clutter_input_device_get_seat (pointer->device),
pointer->device, NULL, &pos, NULL);
focus_window = meta_wayland_surface_get_window (pointer->focus_surface);
if (focus_window)
@ -1061,7 +1062,8 @@ meta_wayland_pointer_get_relative_coordinates (MetaWaylandPointer *pointer,
float xf = 0.0f, yf = 0.0f;
graphene_point_t pos;
clutter_input_device_get_coords (pointer->device, NULL, &pos);
clutter_seat_query_state (clutter_input_device_get_seat (pointer->device),
pointer->device, NULL, &pos, NULL);
meta_wayland_surface_get_relative_coordinates (surface, pos.x, pos.y, &xf, &yf);
*sx = wl_fixed_from_double (xf);

View File

@ -546,7 +546,8 @@ meta_x11_drag_dest_update (MetaWaylandDataDevice *data_device,
MetaWaylandSeat *seat = compositor->seat;
graphene_point_t pos;
clutter_input_device_get_coords (seat->pointer->device, NULL, &pos);
clutter_seat_query_state (clutter_input_device_get_seat (seat->pointer->device),
seat->pointer->device, NULL, &pos, NULL);
xdnd_send_position (dnd, dnd->dnd_dest,
clutter_get_current_event_time (),
pos.x, pos.y);
@ -834,7 +835,8 @@ meta_xwayland_dnd_handle_client_message (MetaWaylandCompositor *compositor,
dnd->client_message_timestamp = event->data.l[3];
motion = clutter_event_new (CLUTTER_MOTION);
clutter_input_device_get_coords (seat->pointer->device, NULL, &pos);
clutter_seat_query_state (clutter_input_device_get_seat (seat->pointer->device),
seat->pointer->device, NULL, &pos, NULL);
clutter_event_set_coords (motion, pos.x, pos.y);
clutter_event_set_device (motion, seat->pointer->device);
clutter_event_set_source_device (motion, seat->pointer->device);