[mutter/wip/carlosg/input-thread: 10/32] clutter: Drop clutter_input_device_get_modifier_state() API
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/input-thread: 10/32] clutter: Drop clutter_input_device_get_modifier_state() API
- Date: Mon, 23 Nov 2020 17:38:16 +0000 (UTC)
commit 02aa5ccc1b90300d96043636488558d633ea9eed
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Nov 18 15:58:10 2020 +0100
clutter: Drop clutter_input_device_get_modifier_state() API
This is using ClutterSeat state queries underneath, let the only
caller do that, and drop this call.
clutter/clutter/clutter-input-device.c | 27 ---------------------------
clutter/clutter/clutter-input-device.h | 2 --
src/wayland/meta-wayland-data-device.c | 3 ++-
3 files changed, 2 insertions(+), 30 deletions(-)
---
diff --git a/clutter/clutter/clutter-input-device.c b/clutter/clutter/clutter-input-device.c
index 25dd06ded9..d3059c2c25 100644
--- a/clutter/clutter/clutter-input-device.c
+++ b/clutter/clutter/clutter-input-device.c
@@ -465,33 +465,6 @@ clutter_input_device_init (ClutterInputDevice *self)
self->inv_touch_sequence_actors = g_hash_table_new (NULL, NULL);
}
-/**
- * clutter_input_device_get_modifier_state:
- * @device: a #ClutterInputDevice
- *
- * Retrieves the current modifiers state of the device, as seen
- * by the last event Clutter processed.
- *
- * Return value: the last known modifier state
- *
- * Since: 1.16
- */
-ClutterModifierType
-clutter_input_device_get_modifier_state (ClutterInputDevice *device)
-{
- uint32_t modifiers;
- ClutterSeat *seat;
-
- g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), 0);
-
- seat = clutter_input_device_get_seat (device);
-
- if (!clutter_seat_query_state (seat, device, NULL, NULL, &modifiers))
- return 0;
-
- return modifiers;
-}
-
static void
_clutter_input_device_associate_actor (ClutterInputDevice *device,
ClutterEventSequence *sequence,
diff --git a/clutter/clutter/clutter-input-device.h b/clutter/clutter/clutter-input-device.h
index 5952745ee8..34206afb73 100644
--- a/clutter/clutter/clutter-input-device.h
+++ b/clutter/clutter/clutter-input-device.h
@@ -83,8 +83,6 @@ GType clutter_input_device_get_type (void) G_GNUC_CONST;
CLUTTER_EXPORT
ClutterInputDeviceType clutter_input_device_get_device_type (ClutterInputDevice *device);
-CLUTTER_EXPORT
-ClutterModifierType clutter_input_device_get_modifier_state (ClutterInputDevice *device);
CLUTTER_EXPORT
ClutterActor * clutter_input_device_get_actor (ClutterInputDevice *device,
ClutterEventSequence *sequence);
diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c
index 6e7a838a69..b5f9a0c37f 100644
--- a/src/wayland/meta-wayland-data-device.c
+++ b/src/wayland/meta-wayland-data-device.c
@@ -612,7 +612,8 @@ meta_wayland_data_device_start_drag (MetaWaylandDataDevice *data
drag_grab->need_initial_focus = TRUE;
- modifiers = clutter_input_device_get_modifier_state (seat->pointer->device);
+ clutter_seat_query_state (clutter_input_device_get_seat (seat->pointer->device),
+ seat->pointer->device, NULL, NULL, &modifiers);
drag_grab->buttons = modifiers &
(CLUTTER_BUTTON1_MASK | CLUTTER_BUTTON2_MASK | CLUTTER_BUTTON3_MASK |
CLUTTER_BUTTON4_MASK | CLUTTER_BUTTON5_MASK);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]