fix(wm): respect rules on startup window scan

This commit is contained in:
LGUG2Z committed 2025-09-26 12:43:31 -07:00
1 parent ae0ce4c95d
commit 486aecda4c
2 files changed
+8 -4

No files matched your search

+7 -3
View File
@@ -15,6 +15,7 @@ use crate::core_graphics::CoreGraphicsApi;
use crate::ioreg::IoReg;
use crate::monitor::Monitor;
use crate::monitor::MonitorInfo;
use crate::window::RuleDebug;
use crate::window::WindowInfo;
use crate::window_manager::WindowManager;
use color_eyre::eyre;
@@ -285,9 +286,12 @@ impl MacosApi {
};
if let Some(window) = application.window_by_title(&info.name) {
window.observe(&wm.run_loop)?;
entry.push(window);
valid_window_count += 1
let mut rule_debug = RuleDebug::default();
if window.should_manage(None, &mut rule_debug)? {
window.observe(&wm.run_loop)?;
entry.push(window);
valid_window_count += 1
}
}
}
}
+1 -1
View File
@@ -643,7 +643,7 @@ impl Window {
#[tracing::instrument(skip_all)]
pub fn should_manage(
self,
&self,
event: Option<WindowManagerEvent>,
debug: &mut RuleDebug,
) -> eyre::Result<bool> {