fix(tauri-runtime-wry): only emit global tray event if tray was found
@@ -2628,7 +2628,6 @@ fn handle_event_loop<T: UserEvent>(
for handler in handlers {
handler(&event);
}
- }
let global_listeners = system_tray_manager.global_listeners.lock().unwrap();
let global_listeners_iter = global_listeners.iter();
@@ -2636,6 +2635,7 @@ fn handle_event_loop<T: UserEvent>(
global_listener(tray_id, &event);
}
}
+ }
#[cfg(all(desktop, feature = "system-tray"))]
Event::TrayEvent {
id,
