[mutter/bilelmoussaoui/without-xwayland: 39/40] 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: 39/40] wayland: Move Xwayland specific call to xwayland
- Date: Mon, 18 Jul 2022 07:31:59 +0000 (UTC)
commit 655ac0340a43b60a9c7503e3e84c1b4327a1497a
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 | 7 ++++++-
3 files changed, 6 insertions(+), 14 deletions(-)
---
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index 74f8a98f7a..f354f3de2a 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -621,14 +621,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 d43a562e8e..7726b2bc09 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -1117,6 +1117,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;
}
@@ -1282,7 +1287,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]