eaf4422
From 12a9c05a3088480bc7ab80902e384053f10e51a6 Mon Sep 17 00:00:00 2001
3ae2631
From: Hans de Goede <hdegoede@redhat.com>
3ae2631
Date: Mon, 4 Nov 2019 11:46:49 +0100
efa2d86
Subject: [PATCH xserver 22/24] xwayland: Call
3ae2631
 xwl_window_check_resolution_change_emulation() on newly created O-R windows
3ae2631
3ae2631
Some clients, which use vidmode to change the resolution when going fullscreen,
3ae2631
create an override-redirect window and never trigger the screen->ResizeWindow
3ae2631
callback we rely on to do the xwl_window_check_resolution_change_emulation().
3ae2631
3ae2631
This causes us to not apply a viewport to them, causing the fullscreen window
3ae2631
to not fill the entire monitor.
3ae2631
3ae2631
This commit adds a call to xwl_window_check_resolution_change_emulation()
3ae2631
at the end of ensure_surface_for_window() to fix this. Note that
3ae2631
ensure_surface_for_window() exits early without creating an xwl_window
3ae2631
for new windows which will not be backed by a wayland surface and which
3ae2631
thus will not have an xwl_window.
3ae2631
3ae2631
This fixes ClanLib-0.6.x and alleggl-4.4.x using apps not properly
3ae2631
fullscreening.
3ae2631
efa2d86
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
3ae2631
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
efa2d86
(cherry picked from commit 4cfc2677f5c82ca5db0919de549b9b077f1ba113)
3ae2631
---
3ae2631
 hw/xwayland/xwayland.c | 5 +++++
3ae2631
 1 file changed, 5 insertions(+)
3ae2631
3ae2631
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
eaf4422
index 7111e20ae..734e76b2e 100644
3ae2631
--- a/hw/xwayland/xwayland.c
3ae2631
+++ b/hw/xwayland/xwayland.c
eaf4422
@@ -821,6 +821,11 @@ ensure_surface_for_window(WindowPtr window)
3ae2631
 
3ae2631
     xwl_window_init_allow_commits(xwl_window);
3ae2631
 
efa2d86
+    if (!window_is_wm_window(window)) {
3ae2631
+        /* CSD or O-R toplevel window, check viewport on creation */
3ae2631
+        xwl_window_check_resolution_change_emulation(xwl_window);
3ae2631
+    }
3ae2631
+
3ae2631
     return TRUE;
3ae2631
 
3ae2631
 err_surf:
3ae2631
-- 
eaf4422
2.26.2
3ae2631