mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-05-06 02:43:26 +02:00
fix(wm): rm layout_flip for custom layouts
This commit ensures that when a custom layout is loaded, either manually or via a workspace layout rule trigger threshold being amtched, any layout_flip property for the impacted workspace will be removed, to allow for key bindings to work as expected on the custom layout.
This commit is contained in:
@@ -1475,6 +1475,7 @@ impl WindowManager {
|
||||
}
|
||||
|
||||
workspace.set_layout(Layout::Custom(layout));
|
||||
workspace.set_layout_flip(None);
|
||||
self.update_focused_workspace(self.mouse_follows_focus)
|
||||
}
|
||||
|
||||
@@ -1715,6 +1716,7 @@ impl WindowManager {
|
||||
.ok_or_else(|| anyhow!("there is no monitor"))?;
|
||||
|
||||
workspace.set_layout(Layout::Custom(layout));
|
||||
workspace.set_layout_flip(None);
|
||||
|
||||
// If this is the focused workspace on a non-focused screen, let's update it
|
||||
if focused_monitor_idx != monitor_idx && focused_workspace_idx == workspace_idx {
|
||||
|
||||
@@ -183,6 +183,10 @@ impl Workspace {
|
||||
}
|
||||
|
||||
if let Some(updated_layout) = updated_layout {
|
||||
if !matches!(updated_layout, Layout::Default(DefaultLayout::BSP)) {
|
||||
self.set_layout_flip(None);
|
||||
}
|
||||
|
||||
self.set_layout(updated_layout);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user