mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
clutter: Drop clutter_input_device_set_coords()
Input devices aren't "updated" anymore, but their state queried to the seat. This goes nowhere. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403
This commit is contained in:
parent
9b3ca86b7c
commit
307be1e495
@ -121,8 +121,6 @@ struct _ClutterInputDevice
|
||||
int click_count;
|
||||
|
||||
/* the current state */
|
||||
float current_x;
|
||||
float current_y;
|
||||
int current_button_number;
|
||||
ClutterModifierType current_state;
|
||||
|
||||
@ -173,11 +171,6 @@ CLUTTER_EXPORT
|
||||
void clutter_input_device_update_from_tool (ClutterInputDevice *device,
|
||||
ClutterInputDeviceTool *tool);
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_input_device_set_coords (ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
gfloat x,
|
||||
gfloat y);
|
||||
CLUTTER_EXPORT
|
||||
ClutterActor * clutter_input_device_update (ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
ClutterStage *stage,
|
||||
|
@ -512,8 +512,8 @@ clutter_input_device_init (ClutterInputDevice *self)
|
||||
self->click_count = 0;
|
||||
|
||||
self->previous_time = CLUTTER_CURRENT_TIME;
|
||||
self->current_x = self->previous_x = -1;
|
||||
self->current_y = self->previous_y = -1;
|
||||
self->previous_x = -1;
|
||||
self->previous_y = -1;
|
||||
self->current_button_number = self->previous_button_number = -1;
|
||||
|
||||
self->touch_sequences_info =
|
||||
@ -540,40 +540,6 @@ _clutter_input_device_ensure_touch_info (ClutterInputDevice *device,
|
||||
return info;
|
||||
}
|
||||
|
||||
/*< private >
|
||||
* clutter_input_device_set_coords:
|
||||
* @device: a #ClutterInputDevice
|
||||
* @sequence: a #ClutterEventSequence or NULL
|
||||
* @x: X coordinate of the device
|
||||
* @y: Y coordinate of the device
|
||||
*
|
||||
* Stores the last known coordinates of the device
|
||||
*/
|
||||
void
|
||||
_clutter_input_device_set_coords (ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
gfloat x,
|
||||
gfloat y)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
|
||||
|
||||
if (sequence == NULL)
|
||||
{
|
||||
if (device->current_x != x)
|
||||
device->current_x = x;
|
||||
|
||||
if (device->current_y != y)
|
||||
device->current_y = y;
|
||||
}
|
||||
else
|
||||
{
|
||||
ClutterTouchInfo *info;
|
||||
info = _clutter_input_device_ensure_touch_info (device, sequence);
|
||||
info->current_x = x;
|
||||
info->current_y = y;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_input_device_get_modifier_state:
|
||||
* @device: a #ClutterInputDevice
|
||||
|
@ -1013,7 +1013,6 @@ _clutter_stage_queue_event (ClutterStage *stage,
|
||||
{
|
||||
ClutterStagePrivate *priv;
|
||||
gboolean first_event;
|
||||
ClutterInputDevice *device;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
||||
|
||||
@ -1024,23 +1023,6 @@ _clutter_stage_queue_event (ClutterStage *stage,
|
||||
if (copy_event)
|
||||
event = clutter_event_copy (event);
|
||||
|
||||
/* if needed, update the state of the input device of the event.
|
||||
* we do it here to avoid calling the same code from every backend
|
||||
* event processing function
|
||||
*/
|
||||
device = clutter_event_get_device (event);
|
||||
if (device != NULL &&
|
||||
event->type != CLUTTER_PROXIMITY_IN &&
|
||||
event->type != CLUTTER_PROXIMITY_OUT)
|
||||
{
|
||||
ClutterEventSequence *sequence = clutter_event_get_event_sequence (event);
|
||||
gfloat event_x, event_y;
|
||||
|
||||
clutter_event_get_coords (event, &event_x, &event_y);
|
||||
|
||||
_clutter_input_device_set_coords (device, sequence, event_x, event_y, stage);
|
||||
}
|
||||
|
||||
if (first_event)
|
||||
{
|
||||
gboolean compressible = event->type == CLUTTER_MOTION ||
|
||||
|
Loading…
Reference in New Issue
Block a user