From 7b26aab08d36ed5a33de01ffec982cdb341d8003 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 7 Jun 2023 11:04:15 +0200 Subject: [PATCH] wayland: Add compositor API to get the text input object We need to open code a bit the event handling of MetaWaylandTextInput, in order to avoid out of order events. Part-of: --- src/wayland/meta-wayland.c | 6 ++++++ src/wayland/meta-wayland.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c index c27bb5449..eef7a63d8 100644 --- a/src/wayland/meta-wayland.c +++ b/src/wayland/meta-wayland.c @@ -1048,3 +1048,9 @@ meta_wayland_compositor_get_filter_manager (MetaWaylandCompositor *compositor) return priv->filter_manager; } + +MetaWaylandTextInput * +meta_wayland_compositor_get_text_input (MetaWaylandCompositor *compositor) +{ + return compositor->seat->text_input; +} diff --git a/src/wayland/meta-wayland.h b/src/wayland/meta-wayland.h index d0fc57179..98bee3f61 100644 --- a/src/wayland/meta-wayland.h +++ b/src/wayland/meta-wayland.h @@ -27,6 +27,7 @@ #include "core/meta-context-private.h" #include "core/util-private.h" #include "meta/types.h" +#include "wayland/meta-wayland-text-input.h" #include "wayland/meta-wayland-types.h" META_EXPORT_TEST @@ -88,6 +89,8 @@ void meta_wayland_compositor_schedule_surface_association (Me int id, MetaWindow *window); +MetaWaylandTextInput * meta_wayland_compositor_get_text_input (MetaWaylandCompositor *compositor); + #ifdef HAVE_XWAYLAND void meta_wayland_compositor_notify_surface_id (MetaWaylandCompositor *compositor, int id,