Commit 5a3a5e2 1 parent 2a3cefd commit 5a3a5e2 Copy full SHA for 5a3a5e2
File tree 1 file changed +3
-1
lines changed
src/platform_impl/windows
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -425,6 +425,7 @@ impl Window {
425
425
if currently_grabbed == grab && grab == window_state_lock. cursor_grabbed {
426
426
return Ok ( ( ) ) ;
427
427
}
428
+ drop ( window_state_lock) ;
428
429
let window = self . window . clone ( ) ;
429
430
let window_state = Arc :: clone ( & self . window_state ) ;
430
431
let ( tx, rx) = channel ( ) ;
@@ -435,7 +436,6 @@ impl Window {
435
436
}
436
437
let _ = tx. send ( result) ;
437
438
} ) ;
438
- drop ( window_state_lock) ;
439
439
rx. recv ( ) . unwrap ( )
440
440
}
441
441
@@ -500,6 +500,7 @@ impl Window {
500
500
// We only maximize if we're not in fullscreen.
501
501
if window_state. fullscreen . is_none ( ) {
502
502
let window = self . window . clone ( ) ;
503
+ drop ( window_state) ;
503
504
unsafe {
504
505
// `ShowWindow` resizes the window, so it must be called from the main thread.
505
506
self . thread_executor . execute_in_thread ( move || {
@@ -754,6 +755,7 @@ impl Window {
754
755
let mut window_state = self . window_state . lock ( ) ;
755
756
if mem:: replace ( & mut window_state. always_on_top , always_on_top) != always_on_top {
756
757
let window = self . window . clone ( ) ;
758
+ drop ( window_state) ;
757
759
self . thread_executor . execute_in_thread ( move || {
758
760
let insert_after = if always_on_top {
759
761
winuser:: HWND_TOPMOST
You can’t perform that action at this time.
0 commit comments