Open valaphee opened 12 months ago
I don't exactly understand what the issue is, so please bear with me:
The monitors are 4k and 2k (physically). The 4k monitor has a 150% DPI scaling, so that everything there remains reasonably sized. To turn a physical size into a logical one, one divides by the DPI scale. An alternative way of putting this is that a logical pixel on the 4k monitor is 150% larger than usual.
So the window always has the same logical size, but a different physical size. (Physical size as in the number of physical pixels.)
What exactly is going wrong?
The conversion being lossy is unfortunate. I'm guessing that Windows itself is to blame for that, but I'd have to check.
Exactly, but Windows seems to also use the logical size, which results in the window being 150% larger (300% in total) as Winit also scales the window.
@valaphee Could you post a screenshot of that? From the output, it's not entirely obvious.
Sure, the calculator is for reference, its the same window just moved and both screenshots combined.
Did some experimenting, the size is automatically scaled by the OS, but don't know if this is Windows 11 specific, I assume that at some point the scaling had to work, or its a regression.
P.S. is Windows 11 related as the size is now automatically scaled (but its also an inconsistent behavior as for changing the dpi without moving the window the size must be scaled manually)
While testing DPI scaling with two monitors on Windows 11, one running at 4k (150% scaling) and the other at 2k (100% scaling) and both being 32", I noticed that the window size is 50% larger on the 4k one, which should be physically the same size.
And the conversion is also "lossy" because when moving the window between both monitors it's getting larger by one pixel
It seems that both monitors are using 4k logical resolution, but I assume that's Windows 11?