mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-16 05:00:28 +01:00
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>
(cherry picked from commit da84b470cb)
This commit is contained in:
parent
9b349d6a8d
commit
65cf3cf05a
1 changed files with 7 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue