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:
parent
cf5f4de19e
commit
4d4d6e5052
3 changed files with 17 additions and 5 deletions
|
|
@ -332,7 +332,9 @@ impl Window {
|
|||
self.window_state
|
||||
.lock()
|
||||
.unwrap()
|
||||
.set_min_inner_size(min_size)
|
||||
.set_min_inner_size(min_size);
|
||||
// NOTE: Requires commit to be applied.
|
||||
self.request_redraw();
|
||||
}
|
||||
|
||||
/// Set the maximum inner size for the window.
|
||||
|
|
@ -343,7 +345,9 @@ impl Window {
|
|||
self.window_state
|
||||
.lock()
|
||||
.unwrap()
|
||||
.set_max_inner_size(max_size)
|
||||
.set_max_inner_size(max_size);
|
||||
// NOTE: Requires commit to be applied.
|
||||
self.request_redraw();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
@ -392,7 +396,10 @@ impl Window {
|
|||
|
||||
#[inline]
|
||||
pub fn set_resizable(&self, resizable: bool) {
|
||||
self.window_state.lock().unwrap().set_resizable(resizable);
|
||||
if self.window_state.lock().unwrap().set_resizable(resizable) {
|
||||
// NOTE: Requires commit to be applied.
|
||||
self.request_redraw();
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue