winewayland: Fix surface scaling with HiDPI compositor.

The surface scale is there to match between the Wine DPI and the
compositor scaling, not to implement Wine DPI scaling, ie: when
compositor scaling is set to 200% and Wine DPI is also set to 192,
windows are shown at 1:1 scale, instead of being upscaled twice.
This commit is contained in:
Rémi Bernon 2024-10-03 17:19:27 +02:00 committed by Alexandre Julliard
parent 3900f6b741
commit 52838daec5
Notes: Alexandre Julliard 2024-11-12 22:01:20 +01:00
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6805

View file

@ -174,7 +174,7 @@ static void wayland_win_data_get_config(struct wayland_win_data *data,
}
conf->state = window_state;
conf->scale = NtUserGetWinMonitorDpi(data->hwnd, MDT_RAW_DPI) / 96.0;
conf->scale = NtUserGetSystemDpiForProcess(0) / 96.0;
conf->visible = (style & WS_VISIBLE) == WS_VISIBLE;
conf->managed = data->managed;
}