mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-13 12:23:38 +01:00
fix(wm): disallow toggle-float if ws has a monocle container
This commit ensures that the user can't get into a weird state by attempting to float a monocle container. If a user attempts to call toggle-float on a monocle container, a warning will be logged and the command will be ignored.
This commit is contained in:
1 parent
6a10d583a6
commit
6f1d6dbdc7
1 file changed
+4
@@ -3131,6 +3131,10 @@ impl WindowManager {
|
||||
pub fn toggle_float(&mut self, force_float: bool) -> Result<()> {
|
||||
let hwnd = WindowsApi::foreground_window()?;
|
||||
let workspace = self.focused_workspace_mut()?;
|
||||
if workspace.monocle_container().is_some() {
|
||||
tracing::warn!("ignoring toggle-float command while workspace has a monocle container");
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let mut is_floating_window = false;
|
||||
|
||||
|
||||
Reference in new issue
Block a user