[mutter] clutter/evdev: Toggle accessibility features from keyboard



commit fa4a787386e4936e1965561008e8e1bb76f8818f
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Tue Apr 9 16:43:49 2019 +0200

    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

 clutter/clutter/evdev/clutter-input-device-evdev.c | 14 +++++++-------
 1 file 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)
     {


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