mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
This commit is contained in:
committed by
GitHub
parent
3206a7088c
commit
9c82006b2f
7
.changes/fix-deadlock-create-window-from-menu.md
Normal file
7
.changes/fix-deadlock-create-window-from-menu.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"tauri-runtime-wry": patch
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Fixes a deadlock when creating a window from a menu event handler.
|
||||
|
||||
@@ -2279,8 +2279,10 @@ fn handle_event_loop(
|
||||
let event = MenuEvent {
|
||||
menu_item_id: menu_id.0,
|
||||
};
|
||||
let listeners = menu_event_listeners.lock().unwrap();
|
||||
let window_menu_event_listeners = listeners.get(&window_id).cloned().unwrap_or_default();
|
||||
let window_menu_event_listeners = {
|
||||
let listeners = menu_event_listeners.lock().unwrap();
|
||||
listeners.get(&window_id).cloned().unwrap_or_default()
|
||||
};
|
||||
for handler in window_menu_event_listeners.lock().unwrap().values() {
|
||||
handler(&event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user