summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2019-04-09 16:43:49 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2019-04-11 13:51:43 +0000
commitfa4a787386e4936e1965561008e8e1bb76f8818f (patch)
treef430f984139d8cc0bdb6c1923b3cfe6bb5876615
parent85b734fde8e14e0b2f22b090551776bfcaa6d0b7 (diff)
downloadmutter-fa4a787386e4936e1965561008e8e1bb76f8818f.tar.gz
clutter/evdev: Toggle accessibility features from keyboard
The keyboard accessibility setting "enable" is actually even more misleading that initially anticipated, as it does not control the entire keyboard accessibility feature, but just the "enable by keyboard" feature, i.e. being able to enable or disable stickykeys or slowkeys using various keyboard actions. Yet the accessibility features should still work even if the "enable" setting is unset, those can be controlled by the accessibility menu in GNOME Shell for example. Change the clutter/evdev implementation to match that behavior as found in the x11 backend, so both backends are now consistent. https://gitlab.gnome.org/GNOME/mutter/merge_requests/531
-rw-r--r--clutter/clutter/evdev/clutter-input-device-evdev.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/clutter/clutter/evdev/clutter-input-device-evdev.c b/clutter/clutter/evdev/clutter-input-device-evdev.c
index b52689e80..2ac2e119d 100644
--- a/clutter/clutter/evdev/clutter-input-device-evdev.c
+++ b/clutter/clutter/evdev/clutter-input-device-evdev.c
@@ -1132,13 +1132,13 @@ clutter_input_device_evdev_process_kbd_a11y_event (ClutterEvent *e
if (event->key.flags & CLUTTER_EVENT_FLAG_INPUT_METHOD)
goto emit_event;
- if (!(device_evdev->a11y_flags & CLUTTER_A11Y_KEYBOARD_ENABLED))
- goto emit_event;
-
- if (event->type == CLUTTER_KEY_PRESS)
- handle_enablekeys_press (event, device_evdev);
- else
- handle_enablekeys_release (event, device_evdev);
+ if (device_evdev->a11y_flags & CLUTTER_A11Y_KEYBOARD_ENABLED)
+ {
+ if (event->type == CLUTTER_KEY_PRESS)
+ handle_enablekeys_press (event, device_evdev);
+ else
+ handle_enablekeys_release (event, device_evdev);
+ }
if (device_evdev->a11y_flags & CLUTTER_A11Y_MOUSE_KEYS_ENABLED)
{