From e1033951ef687839245d94fb58393af9a66d9ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 5 Apr 2022 23:43:38 +0200 Subject: [PATCH] wayland: Add getter for XWayland manager object Part-of: --- src/wayland/meta-wayland-private.h | 4 ++-- src/wayland/meta-wayland-types.h | 2 ++ src/wayland/meta-wayland.c | 6 ++++++ src/wayland/meta-wayland.h | 3 +++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/wayland/meta-wayland-private.h b/src/wayland/meta-wayland-private.h index b0cb38ab4..12e9b40a4 100644 --- a/src/wayland/meta-wayland-private.h +++ b/src/wayland/meta-wayland-private.h @@ -52,7 +52,7 @@ typedef struct char *name; } MetaXWaylandConnection; -typedef struct +struct _MetaXWaylandManager { MetaXWaylandConnection private_connection; MetaXWaylandConnection public_connection; @@ -73,7 +73,7 @@ typedef struct gboolean has_xrandr; int rr_event_base; int rr_error_base; -} MetaXWaylandManager; +}; struct _MetaWaylandCompositor { diff --git a/src/wayland/meta-wayland-types.h b/src/wayland/meta-wayland-types.h index 81cd89875..2df2b5e2f 100644 --- a/src/wayland/meta-wayland-types.h +++ b/src/wayland/meta-wayland-types.h @@ -64,4 +64,6 @@ typedef struct _MetaWaylandActivation MetaWaylandActivation; typedef struct _MetaWaylandDmaBufManager MetaWaylandDmaBufManager; +typedef struct _MetaXWaylandManager MetaXWaylandManager; + #endif diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c index afea5e875..677300d90 100644 --- a/src/wayland/meta-wayland.c +++ b/src/wayland/meta-wayland.c @@ -819,3 +819,9 @@ meta_wayland_compositor_is_egl_display_bound (MetaWaylandCompositor *compositor) return priv->is_wayland_egl_display_bound; } + +MetaXWaylandManager * +meta_wayland_compositor_get_xwayland_manager (MetaWaylandCompositor *compositor) +{ + return &compositor->xwayland_manager; +} diff --git a/src/wayland/meta-wayland.h b/src/wayland/meta-wayland.h index bee2ef445..6528a02ba 100644 --- a/src/wayland/meta-wayland.h +++ b/src/wayland/meta-wayland.h @@ -94,5 +94,8 @@ void meta_wayland_compositor_notify_surface_id (MetaWaylandCo int id, MetaWaylandSurface *surface); +META_EXPORT_TEST +MetaXWaylandManager * meta_wayland_compositor_get_xwayland_manager (MetaWaylandCompositor *compositor); + #endif