mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 10:08:33 +02:00
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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user