On Wayland, fix min/max inner size setting

The size is only applied on the next `wl_surface::commit` thus we
must trigger the redraw.
This commit is contained in:
Kirill Chibisov 2024-02-01 00:11:31 +04:00 committed by GitHub
parent cf5f4de19e
commit 4d4d6e5052
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 5 deletions

View file

@ -504,10 +504,12 @@ impl WindowState {
}
/// Set the resizable state on the window.
///
/// Returns `true` when the state was applied.
#[inline]
pub fn set_resizable(&mut self, resizable: bool) {
pub fn set_resizable(&mut self, resizable: bool) -> bool {
if self.resizable == resizable {
return;
return false;
}
self.resizable = resizable;
@ -523,6 +525,8 @@ impl WindowState {
if let Some(frame) = self.frame.as_mut() {
frame.set_resizable(resizable);
}
true
}
/// Whether the window is focused by any seat.