[mutter/wip/carlosg/input-thread: 41/96] 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: 41/96] clutter: Drop clutter_input_device_set_coords()
- Date: Sat, 3 Oct 2020 10:09:07 +0000 (UTC)
commit 51f2b9769f0ed27f2a8018523a777bfe569b2243
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 39158c4dee..c37419255b 100644
--- a/clutter/clutter/clutter-input-device-private.h
+++ b/clutter/clutter/clutter-input-device-private.h
@@ -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,
diff --git a/clutter/clutter/clutter-input-device.c b/clutter/clutter/clutter-input-device.c
index 0ff0e5404f..c63024d889 100644
--- a/clutter/clutter/clutter-input-device.c
+++ b/clutter/clutter/clutter-input-device.c
@@ -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
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index e7589dbb32..dfbaccf3d4 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -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 ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]