aboutsummaryrefslogtreecommitdiff
path: root/alacritty
diff options
context:
space:
mode:
authorDavid Hewitt <1939362+davidhewitt@users.noreply.github.com>2019-12-09 17:26:31 +0000
committerChristian Duerr <contact@christianduerr.com>2019-12-09 18:26:31 +0100
commit88b4dbfc5a890569fcfac3fe400fe0ad0ea234cc (patch)
treee44ee2cf51ab59776acfc16307b797ffc4196c3e /alacritty
parent586ff78df251f13ebb499484c957df6bb1c363ed (diff)
downloadr-alacritty-88b4dbfc5a890569fcfac3fe400fe0ad0ea234cc.tar.gz
r-alacritty-88b4dbfc5a890569fcfac3fe400fe0ad0ea234cc.tar.bz2
r-alacritty-88b4dbfc5a890569fcfac3fe400fe0ad0ea234cc.zip
Fix minimize causing resize Windows
Diffstat (limited to 'alacritty')
-rw-r--r--alacritty/src/event.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs
index 2c171e23..4cfc2152 100644
--- a/alacritty/src/event.rs
+++ b/alacritty/src/event.rs
@@ -486,6 +486,17 @@ impl<N: Notify> Processor<N> {
match event {
CloseRequested => processor.ctx.terminal.exit(),
Resized(lsize) => {
+ #[cfg(windows)]
+ {
+ // Minimizing the window sends a Resize event with zero width and
+ // height. But there's no need to ever actually resize to this.
+ // Both WinPTY & ConPTY have issues when resizing down to zero size
+ // and back.
+ if lsize.width == 0.0 && lsize.height == 0.0 {
+ return;
+ }
+ }
+
let psize = lsize.to_physical(processor.ctx.size_info.dpr);
processor.ctx.display_update_pending.dimensions = Some(psize);
processor.ctx.terminal.dirty = true;