[mutter/wip/carlosg/input-thread: 81/96] backends: Simplify function arguments




commit 8c76b492541494db010baa5ffa1d5a8861dbd672
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Aug 11 17:40:52 2020 +0200

    backends: Simplify function arguments
    
    We just pass a device in order to check it with the seat pointer, we
    can do without this.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403

 src/backends/meta-input-settings.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
index 59f4944284..1b9a8af903 100644
--- a/src/backends/meta-input-settings.c
+++ b/src/backends/meta-input-settings.c
@@ -1269,19 +1269,13 @@ pointer_a11y_dwell_direction_from_setting (MetaInputSettings *input_settings,
 }
 
 static void
-load_pointer_a11y_settings (MetaInputSettings  *input_settings,
-                            ClutterInputDevice *device)
+load_pointer_a11y_settings (MetaInputSettings  *input_settings)
 {
   MetaInputSettingsPrivate *priv = meta_input_settings_get_instance_private (input_settings);
   ClutterPointerA11ySettings pointer_a11y_settings;
-  ClutterInputDevice *core_pointer;
   GDesktopMouseDwellMode dwell_mode;
   guint i;
 
-  core_pointer = clutter_seat_get_pointer (priv->seat);
-  if (device && device != core_pointer)
-    return;
-
   clutter_seat_get_pointer_a11y_settings (CLUTTER_SEAT (priv->seat),
                                           &pointer_a11y_settings);
   pointer_a11y_settings.controls = 0;
@@ -1326,7 +1320,7 @@ meta_input_mouse_a11y_settings_changed (GSettings  *settings,
 {
   MetaInputSettings *input_settings = META_INPUT_SETTINGS (user_data);
 
-  load_pointer_a11y_settings (input_settings, NULL);
+  load_pointer_a11y_settings (input_settings);
 }
 
 static GSettings *
@@ -1491,7 +1485,6 @@ apply_device_settings (MetaInputSettings  *input_settings,
   update_pointer_accel_profile (input_settings,
                                 priv->trackball_settings,
                                 device);
-  load_pointer_a11y_settings (input_settings, device);
 
   update_middle_click_emulation (input_settings, priv->mouse_settings, device);
   update_middle_click_emulation (input_settings, priv->touchpad_settings, device);
@@ -1716,6 +1709,7 @@ meta_input_settings_constructed (GObject *object)
   check_mappable_devices (input_settings);
 
   load_keyboard_a11y_settings (input_settings);
+  load_pointer_a11y_settings (input_settings);
 }
 
 static void


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