mirror of
https://github.com/wez/wezterm.git
synced 2024-12-24 13:52:55 +03:00
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:
parent
281a0ce4da
commit
050aa078d7
@ -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)));
|
||||
|
Loading…
Reference in New Issue
Block a user