eaf4422
From 09eb525863ab6c08fd743a637f7da9d10c0c01eb Mon Sep 17 00:00:00 2001
efa2d86
From: Hans de Goede <hdegoede@redhat.com>
efa2d86
Date: Wed, 15 Jan 2020 14:36:45 +0100
efa2d86
Subject: [PATCH xserver 19/24] xwayland: Also check
efa2d86
 resolution-change-emulation when the xwl_window itself moves
efa2d86
efa2d86
The recent change to use the top-level non-window-manager Window drawable
efa2d86
coordinates from xwl_window_check_resolution_change_emulation() in
efa2d86
combination with only calling it on a resize when the top-level window
efa2d86
is moved breaks things with mutter/gnome-shell.
efa2d86
efa2d86
When fullscreening a X11 window, mutter moves its window-decoration Window
efa2d86
wrapping the top-level Window to the monitor's origin coordinates (e.g. 0x0)
efa2d86
last. This updates the top-level's drawable coordinates, but as the
efa2d86
actual MoveWindow is called on the wrapper Window and not on the toplevel
efa2d86
we do not call xwl_window_check_resolution_change_emulation() and we never
efa2d86
enable the viewport.
efa2d86
efa2d86
This commit fixes this by also calling
efa2d86
xwl_window_check_resolution_change_emulation() if the Window being moved
efa2d86
is an xwl_window itself.
efa2d86
efa2d86
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
efa2d86
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
efa2d86
(cherry picked from commit 4fc107460a349a1a46f0e5251e6fd2a31f4c0428)
efa2d86
---
efa2d86
 hw/xwayland/xwayland.c | 2 +-
efa2d86
 1 file changed, 1 insertion(+), 1 deletion(-)
efa2d86
efa2d86
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
eaf4422
index 898a291fd..b40502dad 100644
efa2d86
--- a/hw/xwayland/xwayland.c
efa2d86
+++ b/hw/xwayland/xwayland.c
eaf4422
@@ -1006,7 +1006,7 @@ xwl_resize_window(WindowPtr window,
efa2d86
     xwl_screen->ResizeWindow = screen->ResizeWindow;
efa2d86
     screen->ResizeWindow = xwl_resize_window;
efa2d86
 
efa2d86
-    if (xwl_window && xwl_window_is_toplevel(window))
efa2d86
+    if (xwl_window && (xwl_window_get(window) || xwl_window_is_toplevel(window)))
efa2d86
         xwl_window_check_resolution_change_emulation(xwl_window);
efa2d86
 }
efa2d86
 
efa2d86
-- 
eaf4422
2.26.2
efa2d86