From 05b655e60f06db564062d8bd8414d07eb3120c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 17 Sep 2021 15:53:46 +0200 Subject: [PATCH] seat/x11: Add API to get backend Will be used instead of going via globals by places that already has a seat to fetch things from. Part-of: --- src/backends/x11/meta-seat-x11.c | 6 ++++++ src/backends/x11/meta-seat-x11.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/backends/x11/meta-seat-x11.c b/src/backends/x11/meta-seat-x11.c index 8ac203b3f..744a66d0a 100644 --- a/src/backends/x11/meta-seat-x11.c +++ b/src/backends/x11/meta-seat-x11.c @@ -1821,6 +1821,12 @@ meta_seat_x11_new (MetaBackend *backend, return seat_x11; } +MetaBackend * +meta_seat_x11_get_backend (MetaSeatX11 *seat_x11) +{ + return seat_x11->backend; +} + static ClutterInputDevice * get_source_device_checked (MetaSeatX11 *seat, XIDeviceEvent *xev) diff --git a/src/backends/x11/meta-seat-x11.h b/src/backends/x11/meta-seat-x11.h index 3deded99b..365a12528 100644 --- a/src/backends/x11/meta-seat-x11.h +++ b/src/backends/x11/meta-seat-x11.h @@ -30,6 +30,9 @@ MetaSeatX11 * meta_seat_x11_new (MetaBackend *backend, int opcode, int logical_pointer, int logical_keyboard); + +MetaBackend * meta_seat_x11_get_backend (MetaSeatX11 *seat_x11); + gboolean meta_seat_x11_translate_event (MetaSeatX11 *seat, XEvent *xevent, ClutterEvent *event);