Skip to content

Commit

Permalink
use surface height/width for client side decoration frame resizes
Browse files Browse the repository at this point in the history
  • Loading branch information
dani162 committed Oct 15, 2024
1 parent 9ddca7b commit 3cdc137
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions window/src/os/wayland/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -840,11 +840,9 @@ impl WaylandWindowInner {

log::trace!("Resizing frame");
if !self.window_frame.is_hidden() {
// Clamp the size to at least one pixel.
let width =
NonZeroU32::new(pixel_width as u32).unwrap_or(NonZeroU32::new(1).unwrap());
let height =
NonZeroU32::new(pixel_height as u32).unwrap_or(NonZeroU32::new(1).unwrap());
// Clamp the size to at least one surface heigh/width.
let width = NonZeroU32::new(w).unwrap_or(NonZeroU32::new(1).unwrap());
let height = NonZeroU32::new(h).unwrap_or(NonZeroU32::new(1).unwrap());
self.window_frame.resize(width, height);
}
let (x, y) = self.window_frame.location();
Expand Down

0 comments on commit 3cdc137

Please sign in to comment.