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

committed by
Marge Bot

parent
efc1592d4d
commit
c6849a66e8
@ -324,7 +324,7 @@ meta_backend_monitors_changed (MetaBackend *backend)
|
||||
|
||||
meta_backend_sync_screen_size (backend);
|
||||
|
||||
if (clutter_input_device_get_coords (device, NULL, &point))
|
||||
if (clutter_seat_query_state (seat, device, NULL, &point, NULL))
|
||||
{
|
||||
/* If we're outside all monitors, warp the pointer back inside */
|
||||
if ((!meta_monitor_manager_get_logical_monitor_at (monitor_manager,
|
||||
|
@ -448,7 +448,8 @@ meta_cursor_renderer_update_position (MetaCursorRenderer *renderer)
|
||||
MetaCursorRendererPrivate *priv = meta_cursor_renderer_get_instance_private (renderer);
|
||||
graphene_point_t pos;
|
||||
|
||||
clutter_input_device_get_coords (priv->device, NULL, &pos);
|
||||
clutter_seat_query_state (clutter_input_device_get_seat (priv->device),
|
||||
priv->device, NULL, &pos, NULL);
|
||||
priv->current_x = pos.x;
|
||||
priv->current_y = pos.y;
|
||||
|
||||
|
@ -515,7 +515,8 @@ meta_barrier_manager_native_process (MetaBarrierManagerNative *manager,
|
||||
MetaBarrierEventData barrier_event_data;
|
||||
MetaBarrierImplNative *barrier_impl;
|
||||
|
||||
if (!clutter_input_device_get_coords (device, NULL, &prev_pos))
|
||||
if (!clutter_seat_query_state (clutter_input_device_get_seat (device),
|
||||
device, NULL, &prev_pos, NULL))
|
||||
return;
|
||||
|
||||
g_mutex_lock (&manager->mutex);
|
||||
|
@ -609,7 +609,8 @@ meta_pointer_constraint_impl_native_ensure_constrained (MetaPointerConstraintImp
|
||||
constraint_impl_native = META_POINTER_CONSTRAINT_IMPL_NATIVE (constraint_impl);
|
||||
region = cairo_region_reference (constraint_impl_native->region);
|
||||
|
||||
clutter_input_device_get_coords (device, NULL, &point);
|
||||
clutter_seat_query_state (clutter_input_device_get_seat (device),
|
||||
device, NULL, &point, NULL);
|
||||
x = point.x;
|
||||
y = point.y;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user