summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-01-20 13:03:24 -0600
committerDudemanguy <random342@airmail.cc>2024-01-27 05:12:12 +0000
commitded181f642bc8915e3569d718d404e915cb62c27 (patch)
treed6d0a4d5573934b70ca679bcfb521711297dde60
parente32554cd570d984efb712a7214a40237233a3cea (diff)
downloadmpv-ded181f642bc8915e3569d718d404e915cb62c27.tar.bz2
mpv-ded181f642bc8915e3569d718d404e915cb62c27.tar.xz
wayland: don't rescale dimensions if hidpi-window-scale is disabled
If the scaling value changed for some reason, the window geometry would be recalculated with the new scaling even if this option was disabled. Properly ignore it.
-rw-r--r--video/out/wayland_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index b8c5e00997..de52006317 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -1689,6 +1689,9 @@ static void request_decoration_mode(struct vo_wayland_state *wl, uint32_t mode)
static void rescale_geometry(struct vo_wayland_state *wl, double old_scale)
{
+ if (!wl->vo_opts->hidpi_window_scale)
+ return;
+
double factor = old_scale / wl->scaling;
wl->window_size.x1 /= factor;
wl->window_size.y1 /= factor;