mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-16 05:41:16 +01:00
fix(wm): add hack to manage activity monitor on start
I was running into this a lot when debugging the WindowServer memory ballooning issue fixed in the last commit - the title returned by CGWindowListCopyWindowInfo and the title returned by kAXWindowsAttribute for Activity Monitor differs, so when restarting komorebi, if Activity Monitor is open, it wouldn't get managed. Added a little hack as a workaround for now.
This commit is contained in:
1 parent
2e4660dc12
commit
4d25d4efb0
1 file changed
+4
-1
@@ -188,7 +188,10 @@ impl Application {
|
||||
let window = Window::new(element, self.clone()).ok()?;
|
||||
|
||||
if let Some(window_title) = window.title()
|
||||
&& window_title.eq(title)
|
||||
&& (window_title.eq(title)
|
||||
// TODO: find a better way to deal with these hacks
|
||||
|| (self.name().unwrap_or_default() == "Activity Monitor"
|
||||
&& window_title.starts_with(title)))
|
||||
{
|
||||
target = Some(window);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user