Fix minimize causing resize Windows
This commit is contained in:
parent
586ff78df2
commit
88b4dbfc5a
|
@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Direct escape input on Windows using alt
|
- Direct escape input on Windows using alt
|
||||||
- Incorrect window size on X11 when waking up from suspend
|
- Incorrect window size on X11 when waking up from suspend
|
||||||
- Incorrect width of Unicode 11/12 emojis
|
- Incorrect width of Unicode 11/12 emojis
|
||||||
|
- Minimize on windows causing layout issues
|
||||||
|
|
||||||
## 0.4.0
|
## 0.4.0
|
||||||
|
|
||||||
|
|
|
@ -486,6 +486,17 @@ impl<N: Notify> Processor<N> {
|
||||||
match event {
|
match event {
|
||||||
CloseRequested => processor.ctx.terminal.exit(),
|
CloseRequested => processor.ctx.terminal.exit(),
|
||||||
Resized(lsize) => {
|
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);
|
let psize = lsize.to_physical(processor.ctx.size_info.dpr);
|
||||||
processor.ctx.display_update_pending.dimensions = Some(psize);
|
processor.ctx.display_update_pending.dimensions = Some(psize);
|
||||||
processor.ctx.terminal.dirty = true;
|
processor.ctx.terminal.dirty = true;
|
||||||
|
|
Loading…
Reference in New Issue