mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-16 05:41:16 +01:00
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:
1 parent
88a04c2078
commit
6b52e4b3a4
1 file changed
+14
-2
+14
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user