[mutter] seat/x11: Add API to get backend



commit 05b655e60f06db564062d8bd8414d07eb3120c19
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri Sep 17 15:53:46 2021 +0200

    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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2014>

 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 8ac203b3f1..744a66d0af 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 3deded99b8..365a12528e 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]