[mutter/wip/carlosg/input-thread: 51/130] clutter: Drop clutter_input_device_set_state()




commit 872371d4c7419d37816a53a060518c7d5598ed29
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Jun 6 00:20:46 2020 +0200

    clutter: Drop clutter_input_device_set_state()
    
    Nothing uses it anymore.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403

 clutter/clutter/clutter-input-device-private.h |  3 ---
 clutter/clutter/clutter-input-device.c         | 20 --------------------
 src/backends/native/meta-seat-native.c         | 14 --------------
 3 files changed, 37 deletions(-)
---
diff --git a/clutter/clutter/clutter-input-device-private.h b/clutter/clutter/clutter-input-device-private.h
index 9ceb22c2bb..0c566a9678 100644
--- a/clutter/clutter/clutter-input-device-private.h
+++ b/clutter/clutter/clutter-input-device-private.h
@@ -176,9 +176,6 @@ void _clutter_input_device_set_coords (ClutterInputDevice   *device,
                                        gfloat                x,
                                        gfloat                y);
 CLUTTER_EXPORT
-void _clutter_input_device_set_state (ClutterInputDevice  *device,
-                                      ClutterModifierType  state);
-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 7a17f227e0..6a716002ed 100644
--- a/clutter/clutter/clutter-input-device.c
+++ b/clutter/clutter/clutter-input-device.c
@@ -489,7 +489,6 @@ clutter_input_device_init (ClutterInputDevice *self)
   self->current_x = self->previous_x = -1;
   self->current_y = self->previous_y = -1;
   self->current_button_number = self->previous_button_number = -1;
-  self->current_state = 0;
 
   self->touch_sequences_info =
     g_hash_table_new_full (NULL, NULL,
@@ -549,22 +548,6 @@ _clutter_input_device_set_coords (ClutterInputDevice   *device,
     }
 }
 
-/*< private >
- * clutter_input_device_set_state:
- * @device: a #ClutterInputDevice
- * @state: a bitmask of modifiers
- *
- * Stores the last known modifiers state of the device
- */
-void
-_clutter_input_device_set_state (ClutterInputDevice  *device,
-                                 ClutterModifierType  state)
-{
-  g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
-
-  device->current_state = state;
-}
-
 /**
  * clutter_input_device_get_modifier_state:
  * @device: a #ClutterInputDevice
@@ -1093,19 +1076,16 @@ void
 clutter_input_device_update_from_event (ClutterInputDevice *device,
                                         ClutterEvent       *event)
 {
-  ClutterModifierType event_state;
   ClutterEventSequence *sequence;
   gfloat event_x, event_y;
 
   g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
   g_return_if_fail (event != NULL);
 
-  event_state = clutter_event_get_state (event);
   sequence = clutter_event_get_event_sequence (event);
   clutter_event_get_coords (event, &event_x, &event_y);
 
   _clutter_input_device_set_coords (device, sequence, event_x, event_y);
-  _clutter_input_device_set_state (device, event_state);
 }
 
 /*< private >
diff --git a/src/backends/native/meta-seat-native.c b/src/backends/native/meta-seat-native.c
index 72508f8d71..6d7db96cd1 100644
--- a/src/backends/native/meta-seat-native.c
+++ b/src/backends/native/meta-seat-native.c
@@ -1343,20 +1343,6 @@ meta_event_dispatch (GSource     *g_source,
 
   if (event)
     {
-      ClutterModifierType event_state;
-      ClutterInputDevice *input_device =
-        clutter_event_get_source_device (event);
-      MetaInputDeviceNative *device_evdev =
-        META_INPUT_DEVICE_NATIVE (input_device);
-      MetaSeatNative *seat =
-        meta_input_device_native_get_seat (device_evdev);
-
-      /* update the device states *before* the event */
-      event_state = seat->button_state |
-        xkb_state_serialize_mods (seat->xkb, XKB_STATE_MODS_EFFECTIVE);
-      _clutter_input_device_set_state (seat->core_pointer, event_state);
-      _clutter_input_device_set_state (seat->core_keyboard, event_state);
-
       /* forward the event into clutter for emission etc. */
       _clutter_stage_queue_event (event->any.stage, event, FALSE);
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]