mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-19 23:28:34 +01:00
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:
1 parent
098433155f
commit
7455c4df5e
1 file changed
+5
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user