wayland: improve error check
This avoids a nasty panic, and shows some more context, but doesn't really fix anything. refs: https://github.com/wez/wezterm/issues/4948
This commit is contained in:
1 file changed
+4
-2
@@ -245,8 +245,10 @@ impl WaylandWindow {
|
||||
};
|
||||
window_frame.set_hidden(hidden);
|
||||
window_frame.resize(
|
||||
NonZeroU32::new(dimensions.pixel_width as u32).unwrap(),
|
||||
NonZeroU32::new(dimensions.pixel_height as u32).unwrap(),
|
||||
NonZeroU32::new(dimensions.pixel_width as u32)
|
||||
.ok_or_else(|| anyhow!("dimensions {dimensions:?} are invalid"))?,
|
||||
NonZeroU32::new(dimensions.pixel_height as u32)
|
||||
.ok_or_else(|| anyhow!("dimensions {dimensions:?} are invalid"))?,
|
||||
);
|
||||
|
||||
window.set_min_size(Some((32, 32)));
|
||||
|
||||
Reference in new issue
Block a user