mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-23 17:18:40 +02: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:
@@ -3131,6 +3131,10 @@ impl WindowManager {
|
|||||||
pub fn toggle_float(&mut self, force_float: bool) -> Result<()> {
|
pub fn toggle_float(&mut self, force_float: bool) -> Result<()> {
|
||||||
let hwnd = WindowsApi::foreground_window()?;
|
let hwnd = WindowsApi::foreground_window()?;
|
||||||
let workspace = self.focused_workspace_mut()?;
|
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;
|
let mut is_floating_window = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user