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:
parent
32c22d375a
commit
03be6b687b
@ -37,6 +37,7 @@
|
|||||||
#include "clutter-event-translator.h"
|
#include "clutter-event-translator.h"
|
||||||
#include "clutter-stage-private.h"
|
#include "clutter-stage-private.h"
|
||||||
#include "clutter-private.h"
|
#include "clutter-private.h"
|
||||||
|
#include "clutter-xkb-a11y-x11.h"
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@ -352,9 +353,11 @@ static void
|
|||||||
clutter_device_manager_x11_constructed (GObject *gobject)
|
clutter_device_manager_x11_constructed (GObject *gobject)
|
||||||
{
|
{
|
||||||
ClutterDeviceManagerX11 *manager_x11;
|
ClutterDeviceManagerX11 *manager_x11;
|
||||||
|
ClutterDeviceManager *manager;
|
||||||
ClutterBackendX11 *backend_x11;
|
ClutterBackendX11 *backend_x11;
|
||||||
|
|
||||||
manager_x11 = CLUTTER_DEVICE_MANAGER_X11 (gobject);
|
manager_x11 = CLUTTER_DEVICE_MANAGER_X11 (gobject);
|
||||||
|
manager = CLUTTER_DEVICE_MANAGER (gobject);
|
||||||
|
|
||||||
g_object_get (gobject, "backend", &backend_x11, NULL);
|
g_object_get (gobject, "backend", &backend_x11, NULL);
|
||||||
g_assert (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,
|
_clutter_input_device_set_associated_device (manager_x11->core_keyboard,
|
||||||
manager_x11->core_pointer);
|
manager_x11->core_pointer);
|
||||||
|
|
||||||
|
clutter_device_manager_x11_a11y_init (manager);
|
||||||
|
|
||||||
if (G_OBJECT_CLASS (clutter_device_manager_x11_parent_class)->constructed)
|
if (G_OBJECT_CLASS (clutter_device_manager_x11_parent_class)->constructed)
|
||||||
G_OBJECT_CLASS (clutter_device_manager_x11_parent_class)->constructed (gobject);
|
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_core_device = clutter_device_manager_x11_get_core_device;
|
||||||
manager_class->get_device = clutter_device_manager_x11_get_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->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
|
static void
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include "clutter-event-translator.h"
|
#include "clutter-event-translator.h"
|
||||||
#include "clutter-stage-private.h"
|
#include "clutter-stage-private.h"
|
||||||
#include "clutter-private.h"
|
#include "clutter-private.h"
|
||||||
|
#include "clutter-xkb-a11y-x11.h"
|
||||||
|
|
||||||
#include <X11/extensions/XInput2.h>
|
#include <X11/extensions/XInput2.h>
|
||||||
|
|
||||||
@ -1987,6 +1988,8 @@ clutter_device_manager_xi2_constructed (GObject *gobject)
|
|||||||
|
|
||||||
XSync (backend_x11->xdpy, False);
|
XSync (backend_x11->xdpy, False);
|
||||||
|
|
||||||
|
clutter_device_manager_x11_a11y_init (manager);
|
||||||
|
|
||||||
if (G_OBJECT_CLASS (clutter_device_manager_xi2_parent_class)->constructed)
|
if (G_OBJECT_CLASS (clutter_device_manager_xi2_parent_class)->constructed)
|
||||||
G_OBJECT_CLASS (clutter_device_manager_xi2_parent_class)->constructed (gobject);
|
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->get_device = clutter_device_manager_xi2_get_device;
|
||||||
manager_class->select_stage_events = clutter_device_manager_xi2_select_stage_events;
|
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->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
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user