fix(wm): treat empty titles as unmanageable

Some apps like Raycast do dumb stuff like reporting empty strings as
titles to the system. If your app doesn't have a title, don't give it an
empty string as a title!

This commit adds an explicit string emptiness check on titles when
evaluating windows for management eligibility.
This commit is contained in:
LGUG2Z committed 2026-01-02 15:19:14 -08:00
1 parent 88a04c2078
commit 6b52e4b3a4
1 file changed
+14 -2
+14 -2
View File
@@ -945,8 +945,20 @@ impl Window {
return Ok(false);
}
}
Some(_) => {
debug.has_title = true;
Some(title) => {
// Raycast is dumb and reports an empty string as a title
if title.is_empty() {
if TITLELESS_APPLICATIONS
.lock()
.contains(&self.exe().unwrap_or_default())
{
debug.matches_titleless_applications = self.exe();
} else {
return Ok(false);
}
} else {
debug.has_title = true;
}
}
}