Commit 4dc3c3c5 authored by Christian Duerr's avatar Christian Duerr

Fix formatting and resize conversion comment

Some minor formating issues were still present in the current state of
the PR, these should all be resolved with this.

The comment about converting between logical and physical sizes was also
still present in the `src/display.rs` even though the conversion itself
has been moved to the `src/event.rs` file. To fix this the comment has
also been moved to the `src/event.rs` file.
parent 3c0e2684
......@@ -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 {
......
......@@ -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),
));
}
}
......
......@@ -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, .. } => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment