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
@ -682,37 +682,6 @@ clutter_input_device_get_device_type (ClutterInputDevice *device)
|
||||
return device->device_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_input_device_get_coords:
|
||||
* @device: a #ClutterInputDevice
|
||||
* @sequence: (allow-none): a #ClutterEventSequence, or %NULL if
|
||||
* the device is not touch-based
|
||||
* @point: (out caller-allocates): return location for the pointer
|
||||
* or touch point
|
||||
*
|
||||
* Retrieves the latest coordinates of a pointer or touch point of
|
||||
* @device.
|
||||
*
|
||||
* Return value: %FALSE if the device's sequence hasn't been found,
|
||||
* and %TRUE otherwise.
|
||||
*
|
||||
* Since: 1.12
|
||||
*/
|
||||
gboolean
|
||||
clutter_input_device_get_coords (ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
graphene_point_t *point)
|
||||
{
|
||||
ClutterSeat *seat;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), FALSE);
|
||||
g_return_val_if_fail (point != NULL, FALSE);
|
||||
|
||||
seat = clutter_input_device_get_seat (device);
|
||||
|
||||
return clutter_seat_query_state (seat, device, sequence, point, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* clutter_input_device_update:
|
||||
* @device: a #ClutterInputDevice
|
||||
@ -750,7 +719,8 @@ clutter_input_device_update (ClutterInputDevice *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
clutter_input_device_get_coords (device, sequence, &point);
|
||||
clutter_seat_query_state (clutter_input_device_get_seat (device),
|
||||
device, NULL, &point, NULL);
|
||||
time_ms = CLUTTER_CURRENT_TIME;
|
||||
}
|
||||
|
||||
|
@ -83,10 +83,6 @@ GType clutter_input_device_get_type (void) G_GNUC_CONST;
|
||||
CLUTTER_EXPORT
|
||||
ClutterInputDeviceType clutter_input_device_get_device_type (ClutterInputDevice *device);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_input_device_get_coords (ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
graphene_point_t *point);
|
||||
CLUTTER_EXPORT
|
||||
ClutterModifierType clutter_input_device_get_modifier_state (ClutterInputDevice *device);
|
||||
CLUTTER_EXPORT
|
||||
|
@ -909,7 +909,8 @@ clutter_stage_find_updated_devices (ClutterStage *stage)
|
||||
case CLUTTER_PEN_DEVICE:
|
||||
case CLUTTER_ERASER_DEVICE:
|
||||
case CLUTTER_CURSOR_DEVICE:
|
||||
if (!clutter_input_device_get_coords (dev, NULL, &point))
|
||||
if (!clutter_seat_query_state (seat, dev, NULL,
|
||||
&point, NULL))
|
||||
continue;
|
||||
|
||||
view = clutter_stage_get_view_at (stage, point.x, point.y);
|
||||
|
Reference in New Issue
Block a user