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.
This commit is contained in:
LGUG2Z committed 2025-10-07 18:41:46 -07:00
1 parent ed2185a667
commit 7bbad6539d
1 file changed
+5
+5
View File
@@ -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("<NO TITLE FOUND>"))
);
// 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);
}