From 7455c4df5e1a7dce4208f204cdfff8c8700f1622 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Wed, 28 Oct 2026 20:00:00 -0700 Subject: [PATCH] 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. --- komorebi-recorder/src/analysis/blocks.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/komorebi-recorder/src/analysis/blocks.rs b/komorebi-recorder/src/analysis/blocks.rs index e74c92b9..f21ac427 100644 --- a/komorebi-recorder/src/analysis/blocks.rs +++ b/komorebi-recorder/src/analysis/blocks.rs @@ -217,7 +217,9 @@ pub fn build(lines: &[Line], clock: &ClockMap, rules: &dyn Rules) -> Vec 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 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;