feat(blocks): the handler of komorebi for KDE's events is the span handle_event

Lines logged inside it belong to the event's block, as those inside process_event do.
This commit is contained in:
LGUG2Z committed 2026-10-28 22:50:40 -07:00
1 parent 098433155f
commit 7455c4df5e
1 file changed
+5 -2
+5 -2
View File
@@ -217,7 +217,9 @@ pub fn build(lines: &[Line], clock: &ClockMap, rules: &dyn Rules) -> Vec<Block>
continue;
}
let Some(root @ ("process_event" | "process_command")) = line.root_span() else {
// komorebi for KDE names the span of its event handler `handle_event`
let Some(root @ ("process_event" | "handle_event" | "process_command")) = line.root_span()
else {
continue;
};
let Some(index) = open else {
@@ -226,7 +228,8 @@ pub fn build(lines: &[Line], clock: &ClockMap, rules: &dyn Rules) -> Vec<Block>
let block = &mut blocks[index];
let belongs = matches!(
(root, block.kind),
("process_event", BlockKind::Event) | ("process_command", BlockKind::Command)
("process_event" | "handle_event", BlockKind::Event)
| ("process_command", BlockKind::Command)
);
if !belongs {
continue;