feat(wm): center windows spawned during float override

It's very annoying and unclear when enabling the float override to open
the next window as floating to have that window appear immediately over
an existing tile.

This commit sets an explicit behaviour to center windows spawned while
the float override is active.
This commit is contained in:
LGUG2Z
2025-03-16 15:35:20 -07:00
parent 5919f88b38
commit b6bd191cf5

View File

@@ -397,6 +397,8 @@ impl WindowManager {
if behaviour.float_override {
workspace.floating_windows_mut().push(window);
workspace.set_layer(WorkspaceLayer::Floating);
let mut floating_window = window;
floating_window.center(&workspace.globals().work_area)?;
self.update_focused_workspace(false, false)?;
} else {
match behaviour.current_behaviour {