mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 18:09:10 +00:00
xkb-a11y/x11: Get X11 display from X11 backend
Instead of from ClutterX11. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2014>
This commit is contained in:
parent
4622bd7ca8
commit
c41d2a17da
@ -27,7 +27,9 @@
|
|||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
#include <X11/extensions/XKBstr.h>
|
#include <X11/extensions/XKBstr.h>
|
||||||
|
|
||||||
|
#include "backends/x11/meta-backend-x11.h"
|
||||||
#include "backends/x11/meta-clutter-backend-x11.h"
|
#include "backends/x11/meta-clutter-backend-x11.h"
|
||||||
|
#include "backends/x11/meta-seat-x11.h"
|
||||||
#include "core/display-private.h"
|
#include "core/display-private.h"
|
||||||
#include "meta/meta-x11-errors.h"
|
#include "meta/meta-x11-errors.h"
|
||||||
|
|
||||||
@ -43,6 +45,15 @@
|
|||||||
|
|
||||||
static int _xkb_event_base;
|
static int _xkb_event_base;
|
||||||
|
|
||||||
|
static Display *
|
||||||
|
xdisplay_from_seat (ClutterSeat *seat)
|
||||||
|
{
|
||||||
|
MetaSeatX11 *seat_x11 = META_SEAT_X11 (seat);
|
||||||
|
MetaBackend *backend = meta_seat_x11_get_backend (META_SEAT_X11 (seat_x11));
|
||||||
|
|
||||||
|
return meta_backend_x11_get_xdisplay (META_BACKEND_X11 (backend));
|
||||||
|
}
|
||||||
|
|
||||||
static XkbDescRec *
|
static XkbDescRec *
|
||||||
get_xkb_desc_rec (Display *xdisplay)
|
get_xkb_desc_rec (Display *xdisplay)
|
||||||
{
|
{
|
||||||
@ -78,7 +89,7 @@ set_xkb_desc_rec (Display *xdisplay,
|
|||||||
static void
|
static void
|
||||||
check_settings_changed (ClutterSeat *seat)
|
check_settings_changed (ClutterSeat *seat)
|
||||||
{
|
{
|
||||||
Display *xdisplay = meta_clutter_x11_get_default_display ();
|
Display *xdisplay = xdisplay_from_seat (seat);
|
||||||
MetaKbdA11ySettings kbd_a11y_settings;
|
MetaKbdA11ySettings kbd_a11y_settings;
|
||||||
MetaKeyboardA11yFlags what_changed = 0;
|
MetaKeyboardA11yFlags what_changed = 0;
|
||||||
MetaInputSettings *input_settings;
|
MetaInputSettings *input_settings;
|
||||||
@ -206,7 +217,7 @@ void
|
|||||||
meta_seat_x11_apply_kbd_a11y_settings (ClutterSeat *seat,
|
meta_seat_x11_apply_kbd_a11y_settings (ClutterSeat *seat,
|
||||||
MetaKbdA11ySettings *kbd_a11y_settings)
|
MetaKbdA11ySettings *kbd_a11y_settings)
|
||||||
{
|
{
|
||||||
Display *xdisplay = meta_clutter_x11_get_default_display ();
|
Display *xdisplay = xdisplay_from_seat (seat);
|
||||||
XkbDescRec *desc;
|
XkbDescRec *desc;
|
||||||
gboolean enable_accessX;
|
gboolean enable_accessX;
|
||||||
|
|
||||||
@ -328,7 +339,7 @@ meta_seat_x11_a11y_init (ClutterSeat *seat)
|
|||||||
ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
|
ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
|
||||||
MetaClutterBackendX11 *clutter_backend_x11 =
|
MetaClutterBackendX11 *clutter_backend_x11 =
|
||||||
META_CLUTTER_BACKEND_X11 (clutter_backend);
|
META_CLUTTER_BACKEND_X11 (clutter_backend);
|
||||||
Display *xdisplay = meta_clutter_x11_get_default_display ();
|
Display *xdisplay = xdisplay_from_seat (seat);
|
||||||
guint event_mask;
|
guint event_mask;
|
||||||
|
|
||||||
if (!is_xkb_available (xdisplay))
|
if (!is_xkb_available (xdisplay))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user