[mutter/wip/carlosg/input-thread: 54/130] clutter: Drop clutter_input_device_set_coords()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/input-thread: 54/130] clutter: Drop clutter_input_device_set_coords()
- Date: Sat, 21 Nov 2020 18:41:49 +0000 (UTC)
commit 060a3853eb84d9a23a5ceae1465a075d4149c4cc
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Jun 6 12:46:47 2020 +0200
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
clutter/clutter/clutter-input-device-private.h | 7 -----
clutter/clutter/clutter-input-device.c | 38 ++------------------------
clutter/clutter/clutter-stage.c | 18 ------------
3 files changed, 2 insertions(+), 61 deletions(-)
---
diff --git a/clutter/clutter/clutter-input-device-private.h b/clutter/clutter/clutter-input-device-private.h
index 64ae8d0768..35ff2596a3 100644
--- a/clutter/clutter/clutter-input-device-private.h
+++ b/clutter/clutter/clutter-input-device-private.h
@@ -119,8 +119,6 @@ struct _ClutterInputDevice
int click_count;
/* the current state */
- float current_x;
- float current_y;
int current_button_number;
ClutterModifierType current_state;
@@ -171,11 +169,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,
diff --git a/clutter/clutter/clutter-input-device.c b/clutter/clutter/clutter-input-device.c
index 4968dca52e..2ea47900a1 100644
--- a/clutter/clutter/clutter-input-device.c
+++ b/clutter/clutter/clutter-input-device.c
@@ -486,8 +486,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 =
@@ -514,40 +514,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
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 0471729393..e78cc8f1c5 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -672,7 +672,6 @@ _clutter_stage_queue_event (ClutterStage *stage,
{
ClutterStagePrivate *priv;
gboolean first_event;
- ClutterInputDevice *device;
g_return_if_fail (CLUTTER_IS_STAGE (stage));
@@ -683,23 +682,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);
- }
-
if (first_event)
{
gboolean compressible = event->type == CLUTTER_MOTION ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]