From da84b470cb8f877a4a2e898bbd16cec575bf3143 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Wed, 22 Nov 2023 11:06:59 +0100 Subject: [PATCH] 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 Reviewed-By: Kenny Levinsen Acked-by: Peter Hutterer Part-of: --- hw/xwayland/xwayland-window.c | 11 +++++++---- 1 file 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); }