diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-30 08:48:05 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-30 20:12:37 +0300 |
| commit | 8409107a5bb04980ea196a5d7095d5c34f6b2e4e (patch) | |
| tree | 18a3fbcc3cab75a080f9f1d9c1ef2f06e55df237 /src/handlers/xdg_shell.rs | |
| parent | 9089c3fb0224a7f8d425a02fa299f6a5ea607b17 (diff) | |
| download | niri-8409107a5bb04980ea196a5d7095d5c34f6b2e4e.tar.gz niri-8409107a5bb04980ea196a5d7095d5c34f6b2e4e.tar.bz2 niri-8409107a5bb04980ea196a5d7095d5c34f6b2e4e.zip | |
Implement default-window-height for scrolling windows
Diffstat (limited to 'src/handlers/xdg_shell.rs')
| -rw-r--r-- | src/handlers/xdg_shell.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs index 62eafb1b..e6167b0a 100644 --- a/src/handlers/xdg_shell.rs +++ b/src/handlers/xdg_shell.rs @@ -505,6 +505,7 @@ impl XdgShellHandler for State { InitialConfigureState::Configured { rules, width, + height, floating_width, floating_height, is_full_width, @@ -569,7 +570,11 @@ impl XdgShellHandler for State { } else { *width }; - let configure_height = if is_floating { *floating_height } else { None }; + let configure_height = if is_floating { + *floating_height + } else { + *height + }; ws.configure_new_window( &unmapped.window, configure_width, @@ -854,6 +859,7 @@ impl State { let mut width = None; let mut floating_width = None; + let mut height = None; let mut floating_height = None; let is_full_width = rules.open_maximized.unwrap_or(false); let is_floating = rules.compute_open_floating(toplevel); @@ -880,6 +886,7 @@ impl State { width = ws.resolve_default_width(rules.default_width, false); floating_width = ws.resolve_default_width(rules.default_width, true); + height = ws.resolve_default_height(rules.default_height, false); floating_height = ws.resolve_default_height(rules.default_height, true); let configure_width = if is_floating { @@ -889,7 +896,7 @@ impl State { } else { width }; - let configure_height = if is_floating { floating_height } else { None }; + let configure_height = if is_floating { floating_height } else { height }; ws.configure_new_window( window, configure_width, @@ -914,6 +921,7 @@ impl State { *state = InitialConfigureState::Configured { rules, width, + height, floating_width, floating_height, is_full_width, |
