mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-24 09:38:32 +02:00
feat(wm): add mouse follows focus toggle
This commit adds a toggle for the mouse follows focus behaviour that has been the default for komorebi until now. resolve #63
This commit is contained in:
@@ -45,11 +45,11 @@ pub fn new(id: isize, size: Rect, work_area_size: Rect) -> Monitor {
|
||||
}
|
||||
|
||||
impl Monitor {
|
||||
pub fn load_focused_workspace(&mut self) -> Result<()> {
|
||||
pub fn load_focused_workspace(&mut self, mouse_follows_focus: bool) -> Result<()> {
|
||||
let focused_idx = self.focused_workspace_idx();
|
||||
for (i, workspace) in self.workspaces_mut().iter_mut().enumerate() {
|
||||
if i == focused_idx {
|
||||
workspace.restore()?;
|
||||
workspace.restore(mouse_follows_focus)?;
|
||||
} else {
|
||||
workspace.hide();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user