mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
Fixes window inner size calc for hidpi windows X11
X11 always return the geometry in pixel units. Since window.get_inner_size returns the size in points in other window manager implementations X11 should also return in points instead of pixels.
This commit is contained in:
parent
3b7dbd01d0
commit
d65d9950f2
|
@ -535,7 +535,7 @@ impl Window {
|
|||
|
||||
#[inline]
|
||||
pub fn get_inner_size(&self) -> Option<(u32, u32)> {
|
||||
self.get_geometry().map(|(_, _, w, h, _)| (w, h))
|
||||
self.get_geometry().map(|(_, _, w, h, _)| ((w as f32 / self.hidpi_factor()) as u32, (h as f32 / self.hidpi_factor()) as u32))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Reference in a new issue