[mutter/wip/carlosg/no-device-id: 2/10] clutter/click-action: Move away from device IDs
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/no-device-id: 2/10] clutter/click-action: Move away from device IDs
- Date: Wed, 18 Nov 2020 19:10:53 +0000 (UTC)
commit 287d9b6b6fce292c633140f65f3e30005313eff5
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Nov 17 14:39:59 2020 +0100
clutter/click-action: Move away from device IDs
Store the press device itself, not its ID.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1569>
clutter/clutter/clutter-click-action.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter/clutter-click-action.c b/clutter/clutter/clutter-click-action.c
index 6bc977a840..570d86dfbc 100644
--- a/clutter/clutter/clutter-click-action.c
+++ b/clutter/clutter/clutter-click-action.c
@@ -114,7 +114,7 @@ struct _ClutterClickActionPrivate
gint drag_threshold;
guint press_button;
- gint press_device_id;
+ ClutterInputDevice *press_device;
ClutterEventSequence *press_sequence;
ClutterModifierType modifier_state;
gfloat press_x;
@@ -299,7 +299,7 @@ on_event (ClutterActor *actor,
return CLUTTER_EVENT_PROPAGATE;
priv->press_button = has_button ? clutter_event_get_button (event) : 0;
- priv->press_device_id = clutter_event_get_device_id (event);
+ priv->press_device = clutter_event_get_device (event);
priv->press_sequence = clutter_event_get_event_sequence (event);
priv->modifier_state = clutter_event_get_state (event);
clutter_event_get_coords (event, &priv->press_x, &priv->press_y);
@@ -370,7 +370,7 @@ on_captured_event (ClutterActor *stage,
if ((has_button && clutter_event_get_button (event) != priv->press_button) ||
(has_button && clutter_event_get_click_count (event) != 1) ||
- clutter_event_get_device_id (event) != priv->press_device_id ||
+ clutter_event_get_device (event) != priv->press_device ||
clutter_event_get_event_sequence (event) != priv->press_sequence)
return CLUTTER_EVENT_PROPAGATE;
@@ -411,7 +411,7 @@ on_captured_event (ClutterActor *stage,
gfloat motion_x, motion_y;
gfloat delta_x, delta_y;
- if (clutter_event_get_device_id (event) != priv->press_device_id ||
+ if (clutter_event_get_device (event) != priv->press_device ||
clutter_event_get_event_sequence (event) != priv->press_sequence)
return CLUTTER_EVENT_PROPAGATE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]