[mutter/wip/carlosg/input-thread: 82/157] backends/native: Drop users of clutter_input_device_set_stage()




commit 31e5782b857fc5aaf04e2db412554b1ec86f6548
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Jun 5 17:02:35 2020 +0200

    backends/native: Drop users of clutter_input_device_set_stage()
    
    There is no getter, so doing this is now pointless.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403

 src/backends/native/meta-seat-native.c              | 21 ---------------------
 .../native/meta-virtual-input-device-native.c       |  4 ----
 2 files changed, 25 deletions(-)
---
diff --git a/src/backends/native/meta-seat-native.c b/src/backends/native/meta-seat-native.c
index d8195a1b84..4a923fb53f 100644
--- a/src/backends/native/meta-seat-native.c
+++ b/src/backends/native/meta-seat-native.c
@@ -1457,11 +1457,8 @@ evdev_add_device (MetaSeatNative         *seat,
 {
   ClutterInputDeviceType type;
   ClutterInputDevice *device, *master = NULL;
-  ClutterActor *stage;
 
   device = meta_input_device_native_new (seat, libinput_device);
-  stage = CLUTTER_ACTOR (meta_seat_native_get_stage (seat));
-  _clutter_input_device_set_stage (device, CLUTTER_STAGE (stage));
 
   seat->devices = g_slist_prepend (seat->devices, device);
 
@@ -2460,7 +2457,6 @@ meta_seat_native_constructed (GObject *object)
 {
   MetaSeatNative *seat = META_SEAT_NATIVE (object);
   ClutterInputDevice *device;
-  ClutterStage *stage;
   MetaEventSource *source;
   struct udev *udev;
   struct xkb_keymap *xkb_keymap;
@@ -2468,8 +2464,6 @@ meta_seat_native_constructed (GObject *object)
   device = meta_input_device_native_new_virtual (
       seat, CLUTTER_POINTER_DEVICE,
       CLUTTER_INPUT_MODE_MASTER);
-  stage = meta_seat_native_get_stage (seat);
-  _clutter_input_device_set_stage (device, stage);
   seat->pointer_x = INITIAL_POINTER_X;
   seat->pointer_y = INITIAL_POINTER_Y;
   _clutter_input_device_set_coords (device, NULL,
@@ -2480,7 +2474,6 @@ meta_seat_native_constructed (GObject *object)
   device = meta_input_device_native_new_virtual (
       seat, CLUTTER_KEYBOARD_DEVICE,
       CLUTTER_INPUT_MODE_MASTER);
-  _clutter_input_device_set_stage (device, stage);
   seat->core_keyboard = device;
 
   udev = udev_new ();
@@ -2893,21 +2886,7 @@ void
 meta_seat_native_set_stage (MetaSeatNative *seat,
                             ClutterStage   *stage)
 {
-  GSList *l;
-
-  if (seat->stage == stage)
-    return;
-
   seat->stage = stage;
-  _clutter_input_device_set_stage (seat->core_pointer, stage);
-  _clutter_input_device_set_stage (seat->core_keyboard, stage);
-
-  for (l = seat->devices; l; l = l->next)
-    {
-      ClutterInputDevice *device = l->data;
-
-      _clutter_input_device_set_stage (device, stage);
-    }
 }
 
 ClutterStage *
diff --git a/src/backends/native/meta-virtual-input-device-native.c 
b/src/backends/native/meta-virtual-input-device-native.c
index 00d0f70d8c..2033f245b8 100644
--- a/src/backends/native/meta-virtual-input-device-native.c
+++ b/src/backends/native/meta-virtual-input-device-native.c
@@ -680,7 +680,6 @@ meta_virtual_input_device_native_constructed (GObject *object)
   MetaVirtualInputDeviceNative *virtual_evdev =
     META_VIRTUAL_INPUT_DEVICE_NATIVE (object);
   ClutterInputDeviceType device_type;
-  ClutterStage *stage;
 
   device_type = clutter_virtual_input_device_get_device_type (virtual_device);
 
@@ -693,9 +692,6 @@ meta_virtual_input_device_native_constructed (GObject *object)
                                           device_type,
                                           CLUTTER_INPUT_MODE_SLAVE);
 
-  stage = meta_seat_native_get_stage (virtual_evdev->seat);
-  _clutter_input_device_set_stage (virtual_evdev->device, stage);
-
   g_signal_emit_by_name (virtual_evdev->seat,
                          "device-added",
                          virtual_evdev->device);


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