mutter/0001-x11-display-Make-subwindow-redirection-call-mode-spe.patch
2024-07-22 14:19:28 +02:00

63 lines
2.3 KiB
Diff

From d1be108c729331aa169a2a0397925c7b17507857 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Fri, 20 Oct 2023 15:44:29 +0800
Subject: [PATCH 1/4] x11-display: Make subwindow redirection call mode
specific
This means that for X11 sessions we'll do it before any windows are
mapped, and before any plugin implementation is started. Doing it before
a plugin is started is important, because things that the plugin does
during startup can have consequences on how compositing on Xorg works.
For the Xwayland case, we'll do it relatively in the setup phase. It
appears to have been harmless to do it later in the post-opened signal,
but there is no harm in doing it as one of the earlier steps.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3089
---
src/compositor/meta-compositor-x11.c | 2 ++
src/wayland/meta-xwayland.c | 1 +
src/x11/meta-x11-display.c | 1 -
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/compositor/meta-compositor-x11.c b/src/compositor/meta-compositor-x11.c
index cbc48bcefc..760d6fdddc 100644
--- a/src/compositor/meta-compositor-x11.c
+++ b/src/compositor/meta-compositor-x11.c
@@ -188,6 +188,8 @@ meta_compositor_x11_manage (MetaCompositor *compositor,
compositor_x11->have_x11_sync_object = meta_sync_ring_init (xdisplay);
+ meta_x11_display_redirect_windows (x11_display, display);
+
return TRUE;
}
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index 3366f11adc..db0a4a271a 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -1179,6 +1179,7 @@ on_x11_display_setup (MetaDisplay *display,
{
MetaX11Display *x11_display = meta_display_get_x11_display (display);
+ meta_x11_display_redirect_windows (x11_display, display);
meta_xwayland_init_dnd (x11_display);
meta_xwayland_init_xrandr (manager, x11_display);
}
diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c
index 6b8d7faf55..6de0511dc6 100644
--- a/src/x11/meta-x11-display.c
+++ b/src/x11/meta-x11-display.c
@@ -308,7 +308,6 @@ on_x11_display_opened (MetaX11Display *x11_display,
MetaDisplay *display)
{
meta_display_manage_all_xwindows (display);
- meta_x11_display_redirect_windows (x11_display, display);
}
static void
--
2.44.0.501.g19981daefd.dirty