From 4198f6fabc7562652686734ce9304d9d010d4ba7 Mon Sep 17 00:00:00 2001 From: alex-ds13 <145657253+alex-ds13@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:40:40 +0000 Subject: [PATCH] fix(wm): set last focused workspace on alt-tab --- komorebi/src/workspace_reconciliator.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/komorebi/src/workspace_reconciliator.rs b/komorebi/src/workspace_reconciliator.rs index 60cbf2fdb..d3417ea1f 100644 --- a/komorebi/src/workspace_reconciliator.rs +++ b/komorebi/src/workspace_reconciliator.rs @@ -88,6 +88,8 @@ pub fn handle_notifications(wm: Arc>) -> color_eyre::Result let mouse_follows_focus = wm.mouse_follows_focus; if let Some(monitor) = wm.focused_monitor_mut() { + let previous_idx = monitor.focused_workspace_idx(); + monitor.set_last_focused_workspace(Option::from(previous_idx)); monitor.focus_workspace(notification.workspace_idx)?; monitor.load_focused_workspace(mouse_follows_focus)?; }