[mutter/wip/carlosg/input-thread: 131/159] backends/native: Drop meta_seat_native_[gs]et_stage()




commit 5ca334746b860b3fc66a43a3192cfef32b03fb50
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Jul 31 20:20:43 2020 +0200

    backends/native: Drop meta_seat_native_[gs]et_stage()
    
    This is now unused.

 src/backends/native/meta-seat-native.c | 71 ----------------------------------
 src/backends/native/meta-seat-native.h |  9 -----
 2 files changed, 80 deletions(-)
---
diff --git a/src/backends/native/meta-seat-native.c b/src/backends/native/meta-seat-native.c
index b2785838cb..0ad25b8b23 100644
--- a/src/backends/native/meta-seat-native.c
+++ b/src/backends/native/meta-seat-native.c
@@ -2580,15 +2580,6 @@ meta_seat_native_dispose (GObject *object)
 {
   MetaSeatNative *seat = META_SEAT_NATIVE (object);
 
-  g_clear_signal_handler (&seat->stage_added_handler, seat->stage_manager);
-  g_clear_signal_handler (&seat->stage_removed_handler, seat->stage_manager);
-
-  if (seat->stage_manager)
-    {
-      g_object_unref (seat->stage_manager);
-      seat->stage_manager = NULL;
-    }
-
   if (seat->libinput)
     {
       libinput_unref (seat->libinput);
@@ -2860,58 +2851,9 @@ meta_seat_native_class_init (MetaSeatNativeClass *klass)
                                     "touch-mode");
 }
 
-static void
-meta_seat_native_stage_added_cb (ClutterStageManager *manager,
-                                 ClutterStage        *stage,
-                                 MetaSeatNative      *seat)
-{
-  /* NB: Currently we can only associate a single stage with all evdev
-   * devices.
-   *
-   * We save a pointer to the stage so if we release/reclaim input
-   * devices due to switching virtual terminals then we know what
-   * stage to re associate the devices with.
-   */
-  meta_seat_native_set_stage (seat, stage);
-
-  /* We only want to do this once so we can catch the default
-     stage. If the application has multiple stages then it will need
-     to manage the stage of the input devices itself */
-  g_clear_signal_handler (&seat->stage_added_handler, seat->stage_manager);
-}
-
-static void
-meta_seat_native_stage_removed_cb (ClutterStageManager *manager,
-                                   ClutterStage        *stage,
-                                   MetaSeatNative      *seat)
-{
-  meta_seat_native_set_stage (seat, NULL);
-}
-
 static void
 meta_seat_native_init (MetaSeatNative *seat)
 {
-  seat->stage_manager = clutter_stage_manager_get_default ();
-  g_object_ref (seat->stage_manager);
-
-  /* evdev doesn't have any way to link an event to a particular stage
-     so we'll have to leave it up to applications to set the
-     corresponding stage for an input device. However to make it
-     easier for applications that are only using one fullscreen stage
-     (which is probably the most frequent use-case for the evdev
-     backend) we'll associate any input devices that don't have a
-     stage with the first stage created. */
-  seat->stage_added_handler =
-    g_signal_connect (seat->stage_manager,
-                      "stage-added",
-                      G_CALLBACK (meta_seat_native_stage_added_cb),
-                      seat);
-  seat->stage_removed_handler =
-    g_signal_connect (seat->stage_manager,
-                      "stage-removed",
-                      G_CALLBACK (meta_seat_native_stage_removed_cb),
-                      seat);
-
   seat->device_id_next = INITIAL_DEVICE_ID;
 
   seat->repeat = TRUE;
@@ -2939,19 +2881,6 @@ meta_seat_native_get_device (MetaSeatNative *seat,
   return NULL;
 }
 
-void
-meta_seat_native_set_stage (MetaSeatNative *seat,
-                            ClutterStage   *stage)
-{
-  seat->stage = stage;
-}
-
-ClutterStage *
-meta_seat_native_get_stage (MetaSeatNative *seat)
-{
-  return seat->stage;
-}
-
 /**
  * meta_seat_native_set_device_callbacks: (skip)
  * @open_callback: the user replacement for open()
diff --git a/src/backends/native/meta-seat-native.h b/src/backends/native/meta-seat-native.h
index 30e169c582..b24120724b 100644
--- a/src/backends/native/meta-seat-native.h
+++ b/src/backends/native/meta-seat-native.h
@@ -73,11 +73,6 @@ struct _MetaSeatNative
   uint32_t button_state;
   int button_count[KEY_CNT];
 
-  ClutterStage *stage;
-  ClutterStageManager *stage_manager;
-  gulong stage_added_handler;
-  gulong stage_removed_handler;
-
   int device_id_next;
   GList *free_device_ids;
 
@@ -187,10 +182,6 @@ MetaTouchState * meta_seat_native_lookup_touch_state  (MetaSeatNative *seat,
 void meta_seat_native_release_touch_state (MetaSeatNative *seat,
                                            int             seat_slot);
 
-void meta_seat_native_set_stage (MetaSeatNative *seat,
-                                 ClutterStage   *stage);
-ClutterStage * meta_seat_native_get_stage (MetaSeatNative *seat);
-
 void meta_seat_native_clear_repeat_timer (MetaSeatNative *seat);
 
 gint meta_seat_native_acquire_device_id (MetaSeatNative     *seat);


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