summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-03-04 23:06:52 -0600
committerDudemanguy <random342@airmail.cc>2024-03-09 04:27:29 +0000
commit120b0ac4125859fc5bfb555e73ffd4f8905fe881 (patch)
tree7b3b777982d4d1097d79b2f8fcadf7ff9da3a9fc
parent414ddbd628724df3afc1e15f5e415dbb2c76a0b5 (diff)
downloadmpv-120b0ac4125859fc5bfb555e73ffd4f8905fe881.tar.bz2
mpv-120b0ac4125859fc5bfb555e73ffd4f8905fe881.tar.xz
wayland: always rescale geometry if in a fullscreen/maximized state
This should only be a problem during initialization. If in a multi-monitor setup, mpv guesses the wrong scale value and the user passes --fs, the scaled size will be wrong and you have to unfullscreen and fullscreen again to fix it. This is because rescale geometry won't do anything if the value of hidpi-window-scale is false (the default) so the geometry is never rescaled to the correct value thus the wrong size. Normally, mpv will just correct itself after subsequent events occur but because it is considered a locked size (as it should be), we avoid doing any other resizing events thus it never gets corrected. Fix this by just always rescaling the geometry in the locked size case. It shouldn't matter elsewhere because mpv will always have the correct scale value and the possibility of having the wrong one is only possible on startup. Fixes ded181f642bc8915e3569d718d404e915cb62c27
-rw-r--r--video/out/wayland_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index f6c4741a38..6b6b3dc9b1 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -1865,7 +1865,7 @@ 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)
+ if (!wl->vo_opts->hidpi_window_scale && !wl->locked_size)
return;
double factor = old_scale / wl->scaling;