mirror of
https://github.com/wez/wezterm.git
synced 2024-12-25 06:12:16 +03:00
gui: pass window to set_inner_size()
This fixes a regression from a0974a25
where TermWindow::set_inner_size()
can be called before the TermWindow's window has been set.
This commit is contained in:
parent
22f9f8d288
commit
cd5d1f5ea1
@ -1301,19 +1301,17 @@ impl TermWindow {
|
||||
window.invalidate();
|
||||
}
|
||||
TermWindowNotif::SetInnerSize { width, height } => {
|
||||
self.set_inner_size(width, height);
|
||||
self.set_inner_size(window, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn set_inner_size(&mut self, width: usize, height: usize) {
|
||||
if let Some(window) = &self.window {
|
||||
fn set_inner_size(&mut self, window: &Window, width: usize, height: usize) {
|
||||
self.resizes_pending += 1;
|
||||
window.set_inner_size(width, height);
|
||||
}
|
||||
}
|
||||
|
||||
/// Take care to remove our panes from the mux, otherwise
|
||||
/// we can leave the mux with no windows but some panes
|
||||
|
@ -337,7 +337,7 @@ impl super::TermWindow {
|
||||
// pixel geometry which is considered to be a user-driven resize.
|
||||
// Stashing the dimensions here avoids that misconception.
|
||||
self.dimensions = dims;
|
||||
self.set_inner_size(dims.pixel_width, dims.pixel_height);
|
||||
self.set_inner_size(window, dims.pixel_width, dims.pixel_height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user