[mutter] clutter/x11: Configure XKB accessibility



commit 03be6b687b0371ecef9e7734ae8b17e59a77ab4d
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Mon Oct 30 09:35:51 2017 +0100

    clutter/x11: Configure XKB accessibility
    
    Configure XKB accessibility features from the x11 and xi2 clutter input
    device managers, offloading this feature from gnome-settings-daemon.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788564

 .../clutter/x11/clutter-device-manager-core-x11.c  |    6 ++++++
 clutter/clutter/x11/clutter-device-manager-xi2.c   |    4 ++++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter/x11/clutter-device-manager-core-x11.c 
b/clutter/clutter/x11/clutter-device-manager-core-x11.c
index 9fb4776..baad58c 100644
--- a/clutter/clutter/x11/clutter-device-manager-core-x11.c
+++ b/clutter/clutter/x11/clutter-device-manager-core-x11.c
@@ -37,6 +37,7 @@
 #include "clutter-event-translator.h"
 #include "clutter-stage-private.h"
 #include "clutter-private.h"
+#include "clutter-xkb-a11y-x11.h"
 
 enum
 {
@@ -352,9 +353,11 @@ static void
 clutter_device_manager_x11_constructed (GObject *gobject)
 {
   ClutterDeviceManagerX11 *manager_x11;
+  ClutterDeviceManager *manager;
   ClutterBackendX11 *backend_x11;
 
   manager_x11 = CLUTTER_DEVICE_MANAGER_X11 (gobject);
+  manager = CLUTTER_DEVICE_MANAGER (gobject);
 
   g_object_get (gobject, "backend", &backend_x11, NULL);
   g_assert (backend_x11 != NULL);
@@ -389,6 +392,8 @@ clutter_device_manager_x11_constructed (GObject *gobject)
   _clutter_input_device_set_associated_device (manager_x11->core_keyboard,
                                                manager_x11->core_pointer);
 
+  clutter_device_manager_x11_a11y_init (manager);
+
   if (G_OBJECT_CLASS (clutter_device_manager_x11_parent_class)->constructed)
     G_OBJECT_CLASS (clutter_device_manager_x11_parent_class)->constructed (gobject);
 }
@@ -532,6 +537,7 @@ clutter_device_manager_x11_class_init (ClutterDeviceManagerX11Class *klass)
   manager_class->get_core_device = clutter_device_manager_x11_get_core_device;
   manager_class->get_device = clutter_device_manager_x11_get_device;
   manager_class->create_virtual_device = clutter_device_manager_x11_create_virtual_device;
+  manager_class->apply_kbd_a11y_settings = clutter_device_manager_x11_apply_kbd_a11y_settings;
 }
 
 static void
diff --git a/clutter/clutter/x11/clutter-device-manager-xi2.c 
b/clutter/clutter/x11/clutter-device-manager-xi2.c
index da3457a..d2610cc 100644
--- a/clutter/clutter/x11/clutter-device-manager-xi2.c
+++ b/clutter/clutter/x11/clutter-device-manager-xi2.c
@@ -40,6 +40,7 @@
 #include "clutter-event-translator.h"
 #include "clutter-stage-private.h"
 #include "clutter-private.h"
+#include "clutter-xkb-a11y-x11.h"
 
 #include <X11/extensions/XInput2.h>
 
@@ -1987,6 +1988,8 @@ clutter_device_manager_xi2_constructed (GObject *gobject)
 
   XSync (backend_x11->xdpy, False);
 
+  clutter_device_manager_x11_a11y_init (manager);
+
   if (G_OBJECT_CLASS (clutter_device_manager_xi2_parent_class)->constructed)
     G_OBJECT_CLASS (clutter_device_manager_xi2_parent_class)->constructed (gobject);
 }
@@ -2049,6 +2052,7 @@ clutter_device_manager_xi2_class_init (ClutterDeviceManagerXI2Class *klass)
   manager_class->get_device = clutter_device_manager_xi2_get_device;
   manager_class->select_stage_events = clutter_device_manager_xi2_select_stage_events;
   manager_class->create_virtual_device = clutter_device_manager_xi2_create_virtual_device;
+  manager_class->apply_kbd_a11y_settings = clutter_device_manager_x11_apply_kbd_a11y_settings;
 }
 
 static void


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