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
This commit is contained in:
Olivier Fourdan 2017-10-30 09:35:51 +01:00
parent 32c22d375a
commit 03be6b687b
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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