diff options
-rw-r--r-- | src/config.rs | 6 | ||||
-rw-r--r-- | src/display.rs | 9 | ||||
-rw-r--r-- | src/event.rs | 7 |
3 files changed, 13 insertions, 9 deletions
diff --git a/src/config.rs b/src/config.rs index 7e4ee1d2..6b2377e5 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1597,9 +1597,9 @@ fn deserialize_scale_with_dpi<'a, D>(deserializer: D) -> ::std::result::Result<O let _ignored = bool::deserialize(deserializer); eprintln!("{}", Yellow("The `scale_with_dpi` setting has been removed, \ - on X11 the WINIT_HIDPI_FACTOR environment variable can be used instead.")); - Ok(None) - + on X11 the WINIT_HIDPI_FACTOR environment variable can be used instead.") + ); + Ok(None) } fn default_bold_desc() -> FontDescription { diff --git a/src/display.rs b/src/display.rs index bf10e2a4..1143fdd8 100644 --- a/src/display.rs +++ b/src/display.rs @@ -286,9 +286,6 @@ impl Display { // Take most recent resize event, if any while let Ok(size) = self.rx.try_recv() { - // Resize events are emitted via glutin/winit with logical sizes - // However the terminal, window and renderer use physical sizes - // so a conversion must be done here new_size = Some(size); } @@ -305,8 +302,10 @@ impl Display { if new_size == None { // Force a resize to refresh things - new_size = Some(PhysicalSize::new(f64::from(self.size_info.width), - f64::from(self.size_info.height))); + new_size = Some(PhysicalSize::new( + f64::from(self.size_info.width), + f64::from(self.size_info.height), + )); } } diff --git a/src/event.rs b/src/event.rs index 25263541..7a4b99da 100644 --- a/src/event.rs +++ b/src/event.rs @@ -317,7 +317,12 @@ impl<N: Notify> Processor<N> { ::std::process::exit(0); }, Resized(lsize) => { - resize_tx.send(lsize.to_physical(processor.ctx.size_info.dpr)).expect("send new size"); + // Resize events are emitted via glutin/winit with logical sizes + // However the terminal, window and renderer use physical sizes + // so a conversion must be done here + resize_tx + .send(lsize.to_physical(processor.ctx.size_info.dpr)) + .expect("send new size"); processor.ctx.terminal.dirty = true; }, KeyboardInput { input, .. } => { |