mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
clutter: Drop clutter_input_device_set_time()
An input device does not have time on itself, events do. This was made unused so drop it. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1486
This commit is contained in:
parent
a76a47fbde
commit
8d9dc097e4
@ -123,7 +123,6 @@ struct _ClutterInputDevice
|
|||||||
/* the current state */
|
/* the current state */
|
||||||
float current_x;
|
float current_x;
|
||||||
float current_y;
|
float current_y;
|
||||||
uint32_t current_time;
|
|
||||||
int current_button_number;
|
int current_button_number;
|
||||||
ClutterModifierType current_state;
|
ClutterModifierType current_state;
|
||||||
|
|
||||||
@ -183,9 +182,6 @@ CLUTTER_EXPORT
|
|||||||
void _clutter_input_device_set_state (ClutterInputDevice *device,
|
void _clutter_input_device_set_state (ClutterInputDevice *device,
|
||||||
ClutterModifierType state);
|
ClutterModifierType state);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void _clutter_input_device_set_time (ClutterInputDevice *device,
|
|
||||||
guint32 time_);
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
ClutterActor * clutter_input_device_update (ClutterInputDevice *device,
|
ClutterActor * clutter_input_device_update (ClutterInputDevice *device,
|
||||||
ClutterEventSequence *sequence,
|
ClutterEventSequence *sequence,
|
||||||
ClutterStage *stage,
|
ClutterStage *stage,
|
||||||
|
@ -511,7 +511,7 @@ clutter_input_device_init (ClutterInputDevice *self)
|
|||||||
|
|
||||||
self->click_count = 0;
|
self->click_count = 0;
|
||||||
|
|
||||||
self->current_time = self->previous_time = CLUTTER_CURRENT_TIME;
|
self->previous_time = CLUTTER_CURRENT_TIME;
|
||||||
self->current_x = self->previous_x = -1;
|
self->current_x = self->previous_x = -1;
|
||||||
self->current_y = self->previous_y = -1;
|
self->current_y = self->previous_y = -1;
|
||||||
self->current_button_number = self->previous_button_number = -1;
|
self->current_button_number = self->previous_button_number = -1;
|
||||||
@ -610,23 +610,6 @@ clutter_input_device_get_modifier_state (ClutterInputDevice *device)
|
|||||||
return device->current_state;
|
return device->current_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*< private >
|
|
||||||
* clutter_input_device_set_time:
|
|
||||||
* @device: a #ClutterInputDevice
|
|
||||||
* @time_: the time
|
|
||||||
*
|
|
||||||
* Stores the last known event time of the device
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
_clutter_input_device_set_time (ClutterInputDevice *device,
|
|
||||||
guint32 time_)
|
|
||||||
{
|
|
||||||
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
|
|
||||||
|
|
||||||
if (device->current_time != time_)
|
|
||||||
device->current_time = time_;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_clutter_input_device_free_touch_info (gpointer data)
|
_clutter_input_device_free_touch_info (gpointer data)
|
||||||
{
|
{
|
||||||
@ -1162,19 +1145,16 @@ clutter_input_device_update_from_event (ClutterInputDevice *device,
|
|||||||
ClutterModifierType event_state;
|
ClutterModifierType event_state;
|
||||||
ClutterEventSequence *sequence;
|
ClutterEventSequence *sequence;
|
||||||
gfloat event_x, event_y;
|
gfloat event_x, event_y;
|
||||||
guint32 event_time;
|
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
|
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
|
||||||
g_return_if_fail (event != NULL);
|
g_return_if_fail (event != NULL);
|
||||||
|
|
||||||
event_state = clutter_event_get_state (event);
|
event_state = clutter_event_get_state (event);
|
||||||
event_time = clutter_event_get_time (event);
|
|
||||||
sequence = clutter_event_get_event_sequence (event);
|
sequence = clutter_event_get_event_sequence (event);
|
||||||
clutter_event_get_coords (event, &event_x, &event_y);
|
clutter_event_get_coords (event, &event_x, &event_y);
|
||||||
|
|
||||||
_clutter_input_device_set_coords (device, sequence, event_x, event_y);
|
_clutter_input_device_set_coords (device, sequence, event_x, event_y);
|
||||||
_clutter_input_device_set_state (device, event_state);
|
_clutter_input_device_set_state (device, event_state);
|
||||||
_clutter_input_device_set_time (device, event_time);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*< private >
|
/*< private >
|
||||||
|
@ -952,13 +952,11 @@ _clutter_stage_queue_event (ClutterStage *stage,
|
|||||||
event->type != CLUTTER_PROXIMITY_OUT)
|
event->type != CLUTTER_PROXIMITY_OUT)
|
||||||
{
|
{
|
||||||
ClutterEventSequence *sequence = clutter_event_get_event_sequence (event);
|
ClutterEventSequence *sequence = clutter_event_get_event_sequence (event);
|
||||||
guint32 event_time = clutter_event_get_time (event);
|
|
||||||
gfloat event_x, event_y;
|
gfloat event_x, event_y;
|
||||||
|
|
||||||
clutter_event_get_coords (event, &event_x, &event_y);
|
clutter_event_get_coords (event, &event_x, &event_y);
|
||||||
|
|
||||||
_clutter_input_device_set_coords (device, sequence, event_x, event_y);
|
_clutter_input_device_set_coords (device, sequence, event_x, event_y);
|
||||||
_clutter_input_device_set_time (device, event_time);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (first_event)
|
if (first_event)
|
||||||
|
Loading…
Reference in New Issue
Block a user