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.
This commit is contained in:
Dudemanguy 2024-01-20 13:03:24 -06:00
parent e32554cd57
commit ded181f642
1 changed files with 3 additions and 0 deletions

View File

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