Skip to content

Commit

Permalink
fix: check if size is 0 before calling set_destination.
Browse files Browse the repository at this point in the history
Signed-off-by: fortime <palfortime@gmail.com>
  • Loading branch information
fortime committed Jan 17, 2025
1 parent a025f4b commit c944aae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion iced_layershell/src/multi_window/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ where
.viewport
.clone()
.expect("iced_layershell need viewport support to better wayland hidpi");
wpviewport.set_destination(logical_size.width as i32, logical_size.height as i32);
if logical_size.width != 0 && logical_size.height != 0 {
wpviewport.set_destination(logical_size.width as i32, logical_size.height as i32);
}
Self {
id,
application_scale_factor,
Expand Down

0 comments on commit c944aae

Please sign in to comment.