Honor min/max size in more places like initial configure

This commit is contained in:
Ivan Molodetskikh
2024-12-11 09:27:38 +03:00
parent c5fffd6e2c
commit 10460191b9
6 changed files with 111 additions and 47 deletions
+15 -3
View File
@@ -3219,9 +3219,21 @@ impl<W: LayoutElement> Layout<W> {
// prefer-no-csd, and occasionally that last size can become the full-width size
// rather than a smaller size, which is annoying. Need to see if niri can use some
// heuristics to make this case behave better.
if tile.window().is_pending_fullscreen() {
tile.window_mut()
.request_size(Size::from((0, 0)), true, None);
let win = tile.window_mut();
if win.is_pending_fullscreen() {
let mut size = Size::from((0, 0));
// Make sure fixed-size through window rules keeps working.
let min_size = win.min_size();
let max_size = win.max_size();
if min_size.w == max_size.w {
size.w = min_size.w;
}
if min_size.h == max_size.h {
size.h = min_size.h;
}
win.request_size(size, true, None);
}
let mut data = InteractiveMoveData {