diff --git a/docs/changelog.md b/docs/changelog.md index 34e31504a..0fe5b4445 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -27,6 +27,8 @@ As features stabilize some brief notes about them will accumulate here. [#2819](https://github.com/wez/wezterm/issues/2819) * `wezterm ssh` now respects the `AddressFamily` option when connecting [#2893](https://github.com/wez/wezterm/issues/2893) +* Windows: panic when minimizing a window when `front_end='WebGpu'` + [#2881](https://github.com/wez/wezterm/issues/2881) #### Changed * `CTRL-SHIFT-P` now activates the new command palette, instead of `PaneSelect` diff --git a/wezterm-gui/src/termwindow/webgpu.rs b/wezterm-gui/src/termwindow/webgpu.rs index 5590f21d4..796f25553 100644 --- a/wezterm-gui/src/termwindow/webgpu.rs +++ b/wezterm-gui/src/termwindow/webgpu.rs @@ -474,6 +474,11 @@ impl WebGpuState { let mut config = self.config.borrow_mut(); config.width = dims.pixel_width as u32; config.height = dims.pixel_height as u32; - self.surface.configure(&self.device, &config); + if config.width > 0 && config.height > 0 { + // Avoid reconfiguring with a 0 sized surface, as webgpu will + // panic in that case + // + self.surface.configure(&self.device, &config); + } } }