From e8fa92cf0e528f8e823f299b02a356313dbfd138 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Fri, 29 Sep 2023 16:26:41 +0200 Subject: [PATCH] xwayland: Add EI portal support to the Xwayland manager This adds a new API to instruct the MetaXWaylandManager to enable input emulation XDG portal support when Xwayland is started. Part-of: --- src/wayland/meta-wayland-private.h | 2 ++ src/wayland/meta-xwayland-private.h | 3 +++ src/wayland/meta-xwayland.c | 7 +++++++ 3 files changed, 12 insertions(+) diff --git a/src/wayland/meta-wayland-private.h b/src/wayland/meta-wayland-private.h index 0d5d6d260..6af75e5d8 100644 --- a/src/wayland/meta-wayland-private.h +++ b/src/wayland/meta-wayland-private.h @@ -75,6 +75,8 @@ struct _MetaXWaylandManager gboolean has_xrandr; int rr_event_base; int rr_error_base; + + gboolean should_enable_ei_portal; }; struct _MetaWaylandCompositor diff --git a/src/wayland/meta-xwayland-private.h b/src/wayland/meta-xwayland-private.h index 40eb4210f..7a9cb73fd 100644 --- a/src/wayland/meta-xwayland-private.h +++ b/src/wayland/meta-xwayland-private.h @@ -57,3 +57,6 @@ gboolean meta_xwayland_start_xserver_finish (MetaXWaylandManager *manager, gboolean meta_xwayland_manager_handle_xevent (MetaXWaylandManager *manager, XEvent *xevent); + +void meta_xwayland_set_should_enable_ei_portal (MetaXWaylandManager *manager, + gboolean should_enable_ei_portal); diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c index e95ca5640..47591924c 100644 --- a/src/wayland/meta-xwayland.c +++ b/src/wayland/meta-xwayland.c @@ -1295,3 +1295,10 @@ meta_xwayland_signal (MetaXWaylandManager *manager, g_subprocess_send_signal (manager->proc, signum); return TRUE; } + +void +meta_xwayland_set_should_enable_ei_portal (MetaXWaylandManager *manager, + gboolean should_enable_ei_portal) +{ + manager->should_enable_ei_portal = should_enable_ei_portal; +}