summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2023-11-22 11:06:59 +0100
committerOlivier Fourdan <ofourdan@redhat.com>2024-03-20 09:05:36 +0100
commitda84b470cb8f877a4a2e898bbd16cec575bf3143 (patch)
tree5f89ede1cc3c00e92f6aaff081a65e78a113acb8
parent4003b1f9a28c4a333cab9ca7e64a7027ed1da58f (diff)
xwayland: Rename xwl_window_enable_viewport()
To support the fractional scale protocol, we need a viewport. Rename the existing function xwl_window_enable_viewport() to avoid confusion with the viewport we use for fullscreen XRandR emulation in rootless mode. No functional change. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-By: Kenny Levinsen <kl@kl.wtf> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1197>
-rw-r--r--hw/xwayland/xwayland-window.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c
index a10453e13..0ba432fb8 100644
--- a/hw/xwayland/xwayland-window.c
+++ b/hw/xwayland/xwayland-window.c
@@ -264,10 +264,13 @@ xwl_window_disable_viewport(struct xwl_window *xwl_window)
xwl_window->viewport_scale_y = 1.0;
}
+/* Enable the viewport for Xwayland rootful fullscreen, to match the XRandR
+ * resolution with the actual output size.
+ */
static void
-xwl_window_enable_viewport(struct xwl_window *xwl_window,
- struct xwl_output *xwl_output,
- struct xwl_emulated_mode *emulated_mode)
+xwl_window_enable_viewport_for_output(struct xwl_window *xwl_window,
+ struct xwl_output *xwl_output,
+ struct xwl_emulated_mode *emulated_mode)
{
struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
int width, height;
@@ -438,7 +441,7 @@ xwl_window_check_resolution_change_emulation(struct xwl_window *xwl_window)
struct xwl_output *xwl_output;
if (xwl_window_should_enable_viewport(xwl_window, &xwl_output, &emulated_mode))
- xwl_window_enable_viewport(xwl_window, xwl_output, &emulated_mode);
+ xwl_window_enable_viewport_for_output(xwl_window, xwl_output, &emulated_mode);
else if (xwl_window_has_viewport_enabled(xwl_window))
xwl_window_disable_viewport(xwl_window);
}