mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -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. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>
This commit is contained in:
parent
3234ae2993
commit
2411460cff
@ -119,8 +119,6 @@ struct _ClutterInputDevice
|
|||||||
int click_count;
|
int click_count;
|
||||||
|
|
||||||
/* the current state */
|
/* the current state */
|
||||||
float current_x;
|
|
||||||
float current_y;
|
|
||||||
int current_button_number;
|
int current_button_number;
|
||||||
ClutterModifierType current_state;
|
ClutterModifierType current_state;
|
||||||
|
|
||||||
@ -171,11 +169,6 @@ CLUTTER_EXPORT
|
|||||||
void clutter_input_device_update_from_tool (ClutterInputDevice *device,
|
void clutter_input_device_update_from_tool (ClutterInputDevice *device,
|
||||||
ClutterInputDeviceTool *tool);
|
ClutterInputDeviceTool *tool);
|
||||||
CLUTTER_EXPORT
|
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,
|
ClutterActor * clutter_input_device_update (ClutterInputDevice *device,
|
||||||
ClutterEventSequence *sequence,
|
ClutterEventSequence *sequence,
|
||||||
ClutterStage *stage,
|
ClutterStage *stage,
|
||||||
|
@ -486,8 +486,8 @@ clutter_input_device_init (ClutterInputDevice *self)
|
|||||||
self->click_count = 0;
|
self->click_count = 0;
|
||||||
|
|
||||||
self->previous_time = CLUTTER_CURRENT_TIME;
|
self->previous_time = CLUTTER_CURRENT_TIME;
|
||||||
self->current_x = self->previous_x = -1;
|
self->previous_x = -1;
|
||||||
self->current_y = self->previous_y = -1;
|
self->previous_y = -1;
|
||||||
self->current_button_number = self->previous_button_number = -1;
|
self->current_button_number = self->previous_button_number = -1;
|
||||||
|
|
||||||
self->touch_sequences_info =
|
self->touch_sequences_info =
|
||||||
@ -514,40 +514,6 @@ _clutter_input_device_ensure_touch_info (ClutterInputDevice *device,
|
|||||||
return info;
|
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:
|
* clutter_input_device_get_modifier_state:
|
||||||
* @device: a #ClutterInputDevice
|
* @device: a #ClutterInputDevice
|
||||||
|
@ -648,7 +648,6 @@ _clutter_stage_queue_event (ClutterStage *stage,
|
|||||||
{
|
{
|
||||||
ClutterStagePrivate *priv;
|
ClutterStagePrivate *priv;
|
||||||
gboolean first_event;
|
gboolean first_event;
|
||||||
ClutterInputDevice *device;
|
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
||||||
|
|
||||||
@ -659,23 +658,6 @@ _clutter_stage_queue_event (ClutterStage *stage,
|
|||||||
if (copy_event)
|
if (copy_event)
|
||||||
event = clutter_event_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);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (first_event)
|
if (first_event)
|
||||||
{
|
{
|
||||||
gboolean compressible = event->type == CLUTTER_MOTION ||
|
gboolean compressible = event->type == CLUTTER_MOTION ||
|
||||||
|
Loading…
Reference in New Issue
Block a user