backends: Move numlock persistence handling here

We used to have wayland-specific paths for this in src/wayland, now we
have ClutterKeymap that we can rely on in order to do state tracking,
and can do this all on src/backend domain.

This accomodates the feature in common code, so will work on both
Wayland and X11.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/590
This commit is contained in:
Carlos Garnacho
2019-05-23 17:55:20 +02:00
parent 832fc798d5
commit 2b519cba36
6 changed files with 64 additions and 142 deletions

View File

@ -814,6 +814,7 @@ void meta_backend_native_resume (MetaBackendNative *native)
meta_backend_get_monitor_manager (backend);
MetaMonitorManagerKms *monitor_manager_kms =
META_MONITOR_MANAGER_KMS (monitor_manager);
MetaInputSettings *input_settings;
MetaIdleMonitor *idle_monitor;
meta_monitor_manager_kms_resume (monitor_manager_kms);
@ -827,4 +828,7 @@ void meta_backend_native_resume (MetaBackendNative *native)
idle_monitor = meta_backend_get_idle_monitor (backend, 0);
meta_idle_monitor_reset_idletime (idle_monitor);
input_settings = meta_backend_get_input_settings (backend);
meta_input_settings_maybe_restore_numlock_state (input_settings);
}