From 3f3fac8b65f83dcb0e9a78a0214a5497f2a6fa86 Mon Sep 17 00:00:00 2001 From: Dylan Anderson <84342823+DylanAnderson-Tanduo@users.noreply.github.com> Date: Tue, 28 Jul 2026 13:38:23 -0500 Subject: [PATCH] chore(stackbar): tighten deadlock fix comment --- komorebi/src/stackbar_manager/stackbar.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/komorebi/src/stackbar_manager/stackbar.rs b/komorebi/src/stackbar_manager/stackbar.rs index f926c3f7..68543ff2 100644 --- a/komorebi/src/stackbar_manager/stackbar.rs +++ b/komorebi/src/stackbar_manager/stackbar.rs @@ -174,10 +174,8 @@ impl Stackbar { let focused_text_colour = STACKBAR_FOCUSED_TEXT_COLOUR.load_consume(); let unfocused_text_colour = STACKBAR_UNFOCUSED_TEXT_COLOUR.load_consume(); - // Scope the lock so it is released before the synchronous position_window - // call below; the window's wndproc takes the same lock on WM_LBUTTONDOWN, - // and holding it across a cross-thread SetWindowPos deadlocks the two - // threads against each other (mutex <-> message queue cycle) + // The wndproc takes this lock on WM_LBUTTONDOWN, so release it before the + // synchronous position_window call below or the two threads can deadlock { let mut stackbars_containers = STACKBARS_CONTAINERS.lock(); stackbars_containers.insert(self.hwnd, container.clone());