File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
src/platform_impl/windows Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ fn main() {
1717 event_loop. run ( move |event, _, control_flow| {
1818 use winit:: event:: ElementState :: Released ;
1919 use winit:: event:: VirtualKeyCode :: { N , Y } ;
20+ * control_flow = ControlFlow :: Wait ;
2021
2122 match event {
2223 Event :: WindowEvent { event, .. } => match event {
@@ -71,7 +72,5 @@ fn main() {
7172 } ,
7273 _ => ( ) ,
7374 }
74-
75- * control_flow = ControlFlow :: Wait ;
7675 } ) ;
7776}
Original file line number Diff line number Diff line change @@ -448,14 +448,14 @@ impl Window {
448448 let window_state_lock = self . window_state . lock ( ) ;
449449 // We don't want to increment/decrement the display count more than once!
450450 if hide == window_state_lock. cursor_hidden { return ; }
451+ drop ( window_state_lock) ;
451452 let ( tx, rx) = channel ( ) ;
452453 let window_state = Arc :: clone ( & self . window_state ) ;
453454 self . thread_executor . execute_in_thread ( move || {
454455 unsafe { Self :: hide_cursor_inner ( hide) } ;
455456 window_state. lock ( ) . cursor_hidden = hide;
456457 let _ = tx. send ( ( ) ) ;
457458 } ) ;
458- drop ( window_state_lock) ;
459459 rx. recv ( ) . unwrap ( )
460460 }
461461
Original file line number Diff line number Diff line change @@ -4,8 +4,10 @@ fn needs_send<T:Send>() {}
44
55#[ test]
66fn event_loop_proxy_send ( ) {
7- // ensures that `winit::EventLoopProxy` implements `Send`
8- needs_send :: < winit:: event_loop:: EventLoopProxy < ( ) > > ( ) ;
7+ fn is_send < T : Send > ( ) {
8+ // ensures that `winit::EventLoopProxy` implements `Send`
9+ needs_send :: < winit:: event_loop:: EventLoopProxy < T > > ( ) ;
10+ }
911}
1012
1113#[ test]
You can’t perform that action at this time.
0 commit comments