[mutter/bilelmoussaoui/without-xwayland: 327/328] wayland: Move Xwayland specific call to xwayland
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/bilelmoussaoui/without-xwayland: 327/328] wayland: Move Xwayland specific call to xwayland
- Date: Thu, 22 Sep 2022 15:58:39 +0000 (UTC)
commit 272417ffc859c72540d4a92c6f15f60cad7051ad
Author: Bilal Elmoussaoui <belmouss redhat com>
Date: Wed Jun 15 13:24:45 2022 +0200
wayland: Move Xwayland specific call to xwayland
src/wayland/meta-wayland.c | 8 --------
src/wayland/meta-xwayland-private.h | 5 -----
src/wayland/meta-xwayland.c | 11 ++++++++++-
3 files changed, 10 insertions(+), 14 deletions(-)
---
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index f7d6a74e59..aad01c4855 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -634,14 +634,6 @@ meta_wayland_compositor_new (MetaContext *context)
meta_wayland_init_presentation_time (compositor);
meta_wayland_activation_init (compositor);
-#ifdef HAVE_XWAYLAND
- /* Xwayland specific protocol, needs to be filtered out for all other clients */
- if (meta_xwayland_grab_keyboard_init (compositor))
- wl_display_set_global_filter (compositor->wayland_display,
- meta_xwayland_global_filter,
- compositor);
-#endif
-
#ifdef HAVE_WAYLAND_EGLSTREAM
{
gboolean should_enable_eglstream_controller = TRUE;
diff --git a/src/wayland/meta-xwayland-private.h b/src/wayland/meta-xwayland-private.h
index 53c3082d88..8841ef935d 100644
--- a/src/wayland/meta-xwayland-private.h
+++ b/src/wayland/meta-xwayland-private.h
@@ -57,9 +57,4 @@ gboolean meta_xwayland_start_xserver_finish (MetaXWaylandManager *manager,
GAsyncResult *result,
GError **error);
-bool
-meta_xwayland_global_filter (const struct wl_client *client,
- const struct wl_global *global,
- void *data);
-
#endif /* META_XWAYLAND_PRIVATE_H */
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index fe54803688..3f17cfe13e 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -72,6 +72,10 @@ static void meta_xwayland_stop_xserver (MetaXWaylandManager *manager);
static void
meta_xwayland_set_primary_output (MetaX11Display *x11_display);
+static bool meta_xwayland_global_filter (const struct wl_client *client,
+ const struct wl_global *global,
+ void *data);
+
void
meta_xwayland_associate_window_with_surface (MetaWindow *window,
MetaWaylandSurface *surface)
@@ -1116,6 +1120,11 @@ meta_xwayland_init (MetaXWaylandManager *manager,
g_signal_connect (compositor, "prepare-shutdown",
G_CALLBACK (meta_xwayland_shutdown), NULL);
+ /* Xwayland specific protocol, needs to be filtered out for all other clients */
+ meta_xwayland_grab_keyboard_init (compositor);
+ wl_display_set_global_filter (compositor->wayland_display,
+ meta_xwayland_global_filter,
+ compositor);
return TRUE;
}
@@ -1281,7 +1290,7 @@ meta_xwayland_handle_xevent (XEvent *event)
return FALSE;
}
-bool
+static bool
meta_xwayland_global_filter (const struct wl_client *client,
const struct wl_global *global,
void *data)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]