mirror of
https://github.com/tauri-apps/tauri.git
synced 2025-01-03 16:42:42 +03:00
parent
bf764e83e0
commit
23a48007c0
5
.changes/fix-deadlock-file-drop.md
Normal file
5
.changes/fix-deadlock-file-drop.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-runtime-wry": patch
|
||||
---
|
||||
|
||||
Fixes a deadlock on the file drop handler.
|
@ -3013,9 +3013,13 @@ fn create_file_drop_handler<T: UserEvent>(context: &Context<T>) -> Box<FileDropH
|
||||
Box::new(move |window, event| {
|
||||
let event: FileDropEvent = FileDropEventWrapper(event).into();
|
||||
let window_event = WindowEvent::FileDrop(event);
|
||||
let windows = windows.lock().unwrap();
|
||||
if let Some(window) = windows.get(&webview_id_map.get(&window.id())) {
|
||||
let listeners_map = window.window_event_listeners.lock().unwrap();
|
||||
let window_event_listeners = windows
|
||||
.lock()
|
||||
.unwrap()
|
||||
.get(&webview_id_map.get(&window.id()))
|
||||
.map(|w| w.window_event_listeners.clone());
|
||||
if let Some(window_event_listeners) = window_event_listeners {
|
||||
let listeners_map = window_event_listeners.lock().unwrap();
|
||||
let has_listener = !listeners_map.is_empty();
|
||||
let handlers = listeners_map.values();
|
||||
for listener in handlers {
|
||||
|
14
examples/api/src-tauri/Cargo.lock
generated
14
examples/api/src-tauri/Cargo.lock
generated
@ -3130,7 +3130,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"attohttpc",
|
||||
@ -3192,7 +3192,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-build"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cargo_toml",
|
||||
@ -3206,7 +3206,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-codegen"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"brotli",
|
||||
@ -3229,7 +3229,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-macros"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
dependencies = [
|
||||
"heck 0.4.0",
|
||||
"proc-macro2",
|
||||
@ -3241,7 +3241,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"gtk",
|
||||
"http",
|
||||
@ -3259,7 +3259,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime-wry"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"cocoa",
|
||||
"gtk",
|
||||
@ -3277,7 +3277,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-utils"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
dependencies = [
|
||||
"aes-gcm",
|
||||
"brotli",
|
||||
|
Loading…
Reference in New Issue
Block a user