Skip to content

Commit

Permalink
fix(linux): incorrect monitor size, fixes: #175 (#176)
Browse files Browse the repository at this point in the history
* use geometry() to get monitor size

* add .change file

* Update linux-monitor-size.md
  • Loading branch information
FabianLars committed Aug 8, 2021
1 parent 8a45e6b commit eb05193
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/linux-monitor-size.md
@@ -0,0 +1,5 @@
---
"tao": patch
---

Fixes incorrect monitor size on Linux.
5 changes: 3 additions & 2 deletions src/platform_impl/linux/monitor.rs
Expand Up @@ -28,9 +28,10 @@ impl MonitorHandle {

#[inline]
pub fn size(&self) -> PhysicalSize<u32> {
let rect = self.monitor.geometry();
PhysicalSize {
width: self.monitor.width_mm() as u32,
height: self.monitor.height_mm() as u32,
width: rect.width as u32,
height: rect.height as u32,
}
}

Expand Down

0 comments on commit eb05193

Please sign in to comment.