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 ded181f642
This commit is contained in:
Dudemanguy 2024-03-04 23:06:52 -06:00
parent 414ddbd628
commit 120b0ac412
1 changed files with 1 additions and 1 deletions

View File

@ -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;