refactor(wm): move 'locked' flag down to containers

Key Changes
- Added `locked: bool` field directly to the `Container` struct.
- Removed `locked_containers` from `Workspace`.
- Updated `komorebi_bar` to access `locked` directly
  from `Container`.

Insert and swap operations respects `locked` container
indexes in the sequence
This commit is contained in:
JustForFun88
2025-06-15 13:58:33 +05:00
committed by LGUG2Z
parent f6ccec9505
commit 6416c0b6eb
10 changed files with 462 additions and 381 deletions

View File

@@ -846,11 +846,12 @@ impl KomorebiNotificationState {
}
let focused_workspace = &monitor.workspaces()[focused_workspace_idx];
let is_focused = focused_workspace
.locked_containers()
.contains(&focused_workspace.focused_container_idx());
let is_locked = match focused_workspace.focused_container() {
Some(container) => container.locked(),
None => false,
};
self.focused_container_information = (is_focused, focused_workspace.into());
self.focused_container_information = (is_locked, focused_workspace.into());
}
}