Merge pull request #245 from umurgdk/fix-x11-hidpi

Fixes window inner size calc for hidpi windows X11
This commit is contained in:
tomaka 2017-07-27 09:23:30 +02:00 committed by GitHub
commit 45c5568c89

View file

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