File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " tauri " : patch
3+ ---
4+
5+ Fixes deadlock when a plugin window ready event needs to block the thread waiting on the event loop.
Original file line number Diff line number Diff line change @@ -1192,14 +1192,16 @@ impl<R: Runtime> WindowManager<R> {
11921192 }
11931193
11941194 // let plugins know that a new window has been added to the manager
1195- {
1196- self
1197- . inner
1195+ let manager = self . inner . clone ( ) ;
1196+ let window_ = window. clone ( ) ;
1197+ // run on main thread so the plugin store doesn't dead lock with the event loop handler in App
1198+ let _ = window. run_on_main_thread ( move || {
1199+ manager
11981200 . plugins
11991201 . lock ( )
12001202 . expect ( "poisoned plugin store" )
1201- . created ( window . clone ( ) ) ;
1202- }
1203+ . created ( window_ ) ;
1204+ } ) ;
12031205
12041206 window
12051207 }
You can’t perform that action at this time.
0 commit comments