[clutter/clutter-1.20] ClutterInputDevice: Store the cursor coordinate state as floating point
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.20] ClutterInputDevice: Store the cursor coordinate state as floating point
- Date: Sun, 14 Sep 2014 17:51:03 +0000 (UTC)
commit a182d4befa5962be369373c01a66d5b42ac61b4b
Author: Jonas Ådahl <jadahl gmail com>
Date: Sun Sep 14 13:58:11 2014 +0200
ClutterInputDevice: Store the cursor coordinate state as floating point
To support sub-pixel motion events coming from relative events, the
fraction part needs to be stored in the input device state as well. To
do this, simply change the current type from gint to gfloat.
https://bugzilla.gnome.org/show_bug.cgi?id=736413
clutter/clutter-device-manager-private.h | 12 ++++++------
clutter/clutter-input-device.c | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/clutter/clutter-device-manager-private.h b/clutter/clutter-device-manager-private.h
index 826b2f6..2f18b6e 100644
--- a/clutter/clutter-device-manager-private.h
+++ b/clutter/clutter-device-manager-private.h
@@ -65,8 +65,8 @@ typedef struct _ClutterTouchInfo
ClutterEventSequence *sequence;
ClutterActor *actor;
- gint current_x;
- gint current_y;
+ gfloat current_x;
+ gfloat current_y;
} ClutterTouchInfo;
struct _ClutterInputDevice
@@ -106,8 +106,8 @@ struct _ClutterInputDevice
ClutterStage *stage;
/* the current state */
- gint current_x;
- gint current_y;
+ gfloat current_x;
+ gfloat current_y;
guint32 current_time;
gint current_button_number;
ClutterModifierType current_state;
@@ -161,8 +161,8 @@ void _clutter_input_device_remove_event_sequence (ClutterInputDev
ClutterEvent *event);
void _clutter_input_device_set_coords (ClutterInputDevice *device,
ClutterEventSequence *sequence,
- gint x,
- gint y,
+ gfloat x,
+ gfloat y,
ClutterStage *stage);
void _clutter_input_device_set_state (ClutterInputDevice *device,
ClutterModifierType state);
diff --git a/clutter/clutter-input-device.c b/clutter/clutter-input-device.c
index 89728f7..b7de586 100644
--- a/clutter/clutter-input-device.c
+++ b/clutter/clutter-input-device.c
@@ -417,8 +417,8 @@ _clutter_input_device_ensure_touch_info (ClutterInputDevice *device,
void
_clutter_input_device_set_coords (ClutterInputDevice *device,
ClutterEventSequence *sequence,
- gint x,
- gint y,
+ gfloat x,
+ gfloat y,
ClutterStage *stage)
{
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]