mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-12-04 22:16:32 +01:00
fix(wm): respect rules on startup window scan
This commit is contained in:
1 parent
ae0ce4c95d
commit
486aecda4c
2 files changed
+8
-4
No files matched your search
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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> {
|
||||
|
||||
Reference in new issue
Block a user