From 7bbad6539d0d1de427449ef22dc1610542a32e8a Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Tue, 7 Oct 2025 18:41:44 -0700 Subject: [PATCH] fix(wm): ensure messages window close by click is handled Stupid Apple stuff. Something was up with Messages leaving a ghost tile when being closed by the red dot vs. cmd+w - this change fixes that, but will probably break something else. --- komorebi/src/window.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/komorebi/src/window.rs b/komorebi/src/window.rs index ac0c54d8..e8feba9f 100644 --- a/komorebi/src/window.rs +++ b/komorebi/src/window.rs @@ -85,6 +85,7 @@ use std::str::FromStr; use strum::Display; use strum::EnumString; use tracing::instrument; +use crate::reaper::ReaperNotification; const NOTIFICATIONS: &[&str] = &[ kAXWindowMiniaturizedNotification, @@ -224,6 +225,10 @@ impl Drop for Window { .unwrap_or_else(|| String::from("")) ); + // Messages wouldn't close on click which is annoying, this handles that edge case + // for now - hopefully it doesn't break anything else + reaper::send_notification(ReaperNotification::InvalidWindow(self.id)); + // make sure the observer gets removed from any run loops AccessibilityApi::invalidate_observer(&self.observer); }