mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
clutter/input-pointer-a11y: Restore pointer a11y on resume
When suspending, the devices are removed and the virtual device associated with the corresponding core pointer is disposed. Add the pointer accessibility virtual device to the core pointer on resume to restore pointer accessibility on resume if enabled. https://gitlab.gnome.org/GNOME/mutter/merge_requests/761
This commit is contained in:
parent
de98fb29da
commit
2f072af02b
@ -210,6 +210,8 @@ ClutterBackend *_clutter_device_manager_get_backend (ClutterDeviceMa
|
||||
void _clutter_device_manager_compress_motion (ClutterDeviceManager *device_manger,
|
||||
ClutterEvent *event,
|
||||
const ClutterEvent *to_discard);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_device_manager_ensure_a11y_state (ClutterDeviceManager *device_manager);
|
||||
|
||||
/* input device */
|
||||
CLUTTER_EXPORT
|
||||
|
@ -607,6 +607,20 @@ _clutter_device_manager_compress_motion (ClutterDeviceManager *device_manager,
|
||||
manager_class->compress_motion (device_manager, event, to_discard);
|
||||
}
|
||||
|
||||
void
|
||||
clutter_device_manager_ensure_a11y_state (ClutterDeviceManager *device_manager)
|
||||
{
|
||||
ClutterInputDevice *core_pointer;
|
||||
|
||||
core_pointer = clutter_device_manager_get_core_device (device_manager,
|
||||
CLUTTER_POINTER_DEVICE);
|
||||
if (core_pointer)
|
||||
{
|
||||
if (_clutter_is_input_pointer_a11y_enabled (core_pointer))
|
||||
_clutter_input_pointer_a11y_add_device (core_pointer);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
are_kbd_a11y_settings_equal (ClutterKbdA11ySettings *a,
|
||||
ClutterKbdA11ySettings *b)
|
||||
|
@ -821,6 +821,7 @@ void meta_backend_native_resume (MetaBackendNative *native)
|
||||
META_MONITOR_MANAGER_KMS (monitor_manager);
|
||||
MetaInputSettings *input_settings;
|
||||
MetaIdleMonitor *idle_monitor;
|
||||
ClutterDeviceManager *device_manager;
|
||||
|
||||
COGL_TRACE_BEGIN_SCOPED (MetaBackendNativeResume,
|
||||
"Backend (resume)");
|
||||
@ -839,4 +840,7 @@ void meta_backend_native_resume (MetaBackendNative *native)
|
||||
|
||||
input_settings = meta_backend_get_input_settings (backend);
|
||||
meta_input_settings_maybe_restore_numlock_state (input_settings);
|
||||
|
||||
device_manager = clutter_device_manager_get_default ();
|
||||
clutter_device_manager_ensure_a11y_state (device_manager);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user