window: wayland: round up for pixel->surface conversion

This commit is contained in:
Wez Furlong committed 2019-12-01 09:32:35 -08:00
1 parent d53553491a
commit 3059488753
1 file changed
+4 -1
+4 -1
View File
@@ -397,7 +397,10 @@ impl WaylandWindowInner {
}
fn pixels_to_surface(&self, pixels: i32) -> i32 {
pixels / self.get_dpi_factor()
// Take care to round up, otherwise we can lose a pixel
// and that can effectively lose the final row of the
// terminal
((pixels as f64) / (self.get_dpi_factor() as f64)).ceil() as i32
}
fn dispatch_pending_event(&mut self) {