backends/native: Move MetaInputSettings ownership to MetaSeatImpl

Together with keymaps and devices, MetaInputSettings will live in the
ninth circle of hell with MetaSeatImpl, forever tied to it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>
This commit is contained in:
Carlos Garnacho
2020-08-11 18:33:07 +02:00
committed by Marge Bot
parent 4e56352bcc
commit 1609d1459e
7 changed files with 188 additions and 35 deletions

View File

@ -239,10 +239,11 @@ clear_slow_keys (MetaInputDeviceNative *device)
static guint
get_slow_keys_delay (ClutterInputDevice *device)
{
MetaInputDeviceNative *device_native = META_INPUT_DEVICE_NATIVE (device);
MetaKbdA11ySettings a11y_settings;
MetaInputSettings *input_settings;
input_settings = meta_backend_get_input_settings (meta_get_backend ());
input_settings = meta_seat_impl_get_input_settings (device_native->seat_impl);
meta_input_settings_get_kbd_a11y_settings (input_settings, &a11y_settings);
/* Settings use int, we use uint, make sure we dont go negative */
return MAX (0, a11y_settings.slowkeys_delay);
@ -335,10 +336,11 @@ stop_slow_keys (ClutterEvent *event,
static guint
get_debounce_delay (ClutterInputDevice *device)
{
MetaInputDeviceNative *device_native = META_INPUT_DEVICE_NATIVE (device);
MetaKbdA11ySettings a11y_settings;
MetaInputSettings *input_settings;
input_settings = meta_backend_get_input_settings (meta_get_backend ());
input_settings = meta_seat_impl_get_input_settings (device_native->seat_impl);
meta_input_settings_get_kbd_a11y_settings (input_settings, &a11y_settings);
/* Settings use int, we use uint, make sure we dont go negative */
return MAX (0, a11y_settings.debounce_delay);