diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-11-29 21:11:02 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-30 20:12:37 +0300 |
| commit | c5fffd6e2c48aa7fb8b45b8bdcd972bbd8ce900b (patch) | |
| tree | f4bf7c768d21cd72d81da6ca0d1b084631e71276 /src/handlers/xdg_shell.rs | |
| parent | 951f63b6fd48b47ca60e8ed6aa91b4a7b47534f9 (diff) | |
| download | niri-c5fffd6e2c48aa7fb8b45b8bdcd972bbd8ce900b.tar.gz niri-c5fffd6e2c48aa7fb8b45b8bdcd972bbd8ce900b.tar.bz2 niri-c5fffd6e2c48aa7fb8b45b8bdcd972bbd8ce900b.zip | |
Initial WIP floating window implementation
Diffstat (limited to 'src/handlers/xdg_shell.rs')
| -rw-r--r-- | src/handlers/xdg_shell.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs index ae860e4a..869492a2 100644 --- a/src/handlers/xdg_shell.rs +++ b/src/handlers/xdg_shell.rs @@ -459,7 +459,7 @@ impl XdgShellHandler for State { toplevel.with_pending_state(|state| { state.states.set(xdg_toplevel::State::Fullscreen); }); - ws.configure_new_window(&unmapped.window, None, rules); + ws.configure_new_window(&unmapped.window, None, false, rules); } // We already sent the initial configure, so we need to reconfigure. @@ -553,7 +553,13 @@ impl XdgShellHandler for State { } else { *width }; - ws.configure_new_window(&unmapped.window, configure_width, rules); + let is_floating = rules.compute_open_floating(&toplevel); + ws.configure_new_window( + &unmapped.window, + configure_width, + is_floating, + rules, + ); } // We already sent the initial configure, so we need to reconfigure. @@ -815,6 +821,7 @@ impl State { let mut width = None; let is_full_width = rules.open_maximized.unwrap_or(false); + let is_floating = rules.compute_open_floating(toplevel); // Tell the surface the preferred size and bounds for its likely output. let ws = rules @@ -843,7 +850,7 @@ impl State { } else { width }; - ws.configure_new_window(window, configure_width, &rules); + ws.configure_new_window(window, configure_width, is_floating, &rules); } // If the user prefers no CSD, it's a reasonable assumption that they would prefer to get |
