summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2017-10-30 09:35:51 +0100
committerOlivier Fourdan <ofourdan@redhat.com>2017-11-16 14:14:31 +0100
commit03be6b687b0371ecef9e7734ae8b17e59a77ab4d (patch)
tree658fd30cfbca3d83033dcf32ddd344e3148f50c7
parent32c22d375a53f6b4581720cd40bff3edc82e8d29 (diff)
downloadmutter-03be6b687b0371ecef9e7734ae8b17e59a77ab4d.tar.gz
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
-rw-r--r--clutter/clutter/x11/clutter-device-manager-core-x11.c6
-rw-r--r--clutter/clutter/x11/clutter-device-manager-xi2.c4
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 9fb4776f7..baad58c99 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 da3457a65..d2610cc26 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