fix(tauri-runtime-wry): trigger global tray event listeners
@@ -2628,6 +2628,7 @@ 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();
@@ -2635,7 +2636,6 @@ fn handle_event_loop<T: UserEvent>(
global_listener(tray_id, &event);
}
}
- }
#[cfg(all(desktop, feature = "system-tray"))]
Event::TrayEvent {
id,
@@ -2662,6 +2662,12 @@ fn handle_event_loop<T: UserEvent>(
handler(&event);
}
}
+
+ let global_listeners = system_tray_manager.global_listeners.lock().unwrap();
+ let global_listeners_iter = global_listeners.iter();
+ for global_listener in global_listeners_iter {
+ global_listener(id.0, &event);
+ }
}
Event::WindowEvent {
event, window_id, ..
