From e02ddd47cceac3b72fef38f58989e697c860da4c Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 21 Oct 2022 12:13:04 -0700 Subject: [PATCH] fix(wm): eagerly set new active border position This commit adds SocketMessage::FocusWindow as a target to update the border position on at the end of the command handler. There are some occasions where the EVENT_SYSTEM_FOREGROUND notification isn't being sent (on newer versions of Win11, I think), so we can't count on the border being updated when that event is received by the event handler. --- komorebi/src/process_command.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/komorebi/src/process_command.rs b/komorebi/src/process_command.rs index b8f64e68..bd0678ea 100644 --- a/komorebi/src/process_command.rs +++ b/komorebi/src/process_command.rs @@ -868,6 +868,10 @@ impl WindowManager { | SocketMessage::Promote | SocketMessage::PromoteFocus | SocketMessage::Retile + // Adding this one because sometimes EVENT_SYSTEM_FOREGROUND isn't + // getting sent on FocusWindow, meaning the border won't be set + // when processing events + | SocketMessage::FocusWindow(_) | SocketMessage::InvisibleBorders(_) | SocketMessage::WorkAreaOffset(_) | SocketMessage::MoveWindow(_) => {