mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-05-01 00:14:15 +02:00
fix(wm): allow cross-monitor focus w/ monocle+max
This commit removes the focused window monocle/maximized check when trying to focus a container in a direction that requires the focus to cross a monitor boundary. Unfortunately, trying to remove the same check from the move command results in undesired behaviour (the wrong window gets moved, the state gets funny on both the origin and the destination monitor)
This commit is contained in:
@@ -1047,12 +1047,6 @@ impl WindowManager {
|
||||
|
||||
let workspace = self.focused_workspace()?;
|
||||
|
||||
if workspace.is_focused_window_monocle_or_maximized()? {
|
||||
return Err(anyhow!(
|
||||
"ignoring command while active window is in monocle mode or maximized"
|
||||
));
|
||||
}
|
||||
|
||||
tracing::info!("focusing container");
|
||||
|
||||
let new_idx = workspace.new_idx_for_direction(direction);
|
||||
@@ -1082,6 +1076,9 @@ impl WindowManager {
|
||||
self.handle_unmanaged_window_behaviour()?;
|
||||
|
||||
let workspace = self.focused_workspace()?;
|
||||
|
||||
// removing this messes up the monitor / container / window index somewhere
|
||||
// and results in the wrong window getting moved across the monitor boundary
|
||||
if workspace.is_focused_window_monocle_or_maximized()? {
|
||||
return Err(anyhow!(
|
||||
"ignoring command while active window is in monocle mode or maximized"
|
||||
|
||||
Reference in New Issue
Block a user