From 0519ebddbfa88978180b8a25a9e273225f76cb75 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 20 Nov 2021 08:32:10 -0800 Subject: [PATCH] fix(wm): ignore mstsc.exe helper classes on w11 This commit adds OPContainerClass and IHWindowClass to the FLOAT_IDENTIFIERS global vec, to ignore by default the extra invisible input and output handling windows created by mstsc.exe when WSL is launched on Windows 11. fix #74 --- komorebi/src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/komorebi/src/main.rs b/komorebi/src/main.rs index f9f3aa6d..04b22308 100644 --- a/komorebi/src/main.rs +++ b/komorebi/src/main.rs @@ -78,7 +78,12 @@ lazy_static! { static ref WORKSPACE_RULES: Arc>> = Arc::new(Mutex::new(HashMap::new())); static ref MANAGE_IDENTIFIERS: Arc>> = Arc::new(Mutex::new(vec![])); - static ref FLOAT_IDENTIFIERS: Arc>> = Arc::new(Mutex::new(vec![])); + static ref FLOAT_IDENTIFIERS: Arc>> = Arc::new(Mutex::new(vec![ + // mstsc.exe creates these on Windows 11 when a WSL process is launched + // https://github.com/LGUG2Z/komorebi/issues/74 + "OPContainerClass".to_string(), + "IHWindowClass".to_string() + ])); static ref BORDER_OVERFLOW_IDENTIFIERS: Arc>> = Arc::new(Mutex::new(vec![])); static ref WSL2_UI_PROCESSES: Arc>> = Arc::new(Mutex::new(vec![ "X410.exe".to_string(),