@@ -64,8 +64,6 @@ const NSViewLayerContentsRedrawDuringViewResize: NSInteger = 2;
6464const FULLSCREEN_ENTER_HIDE_CONTENT_MS : u64 = 30 ;
6565const FULLSCREEN_EXIT_HIDE_CONTENT_MS : u64 = 20 ;
6666const ZOOM_HIDE_CONTENT_MS : u64 = 20 ;
67- const NATIVE_EXIT_HIDE_CONTENT_MS : u64 = 50 ;
68- const NATIVE_EXIT_POST_HIDE_CONTENT_MS : u64 = 20 ;
6967const MOVE_PERSIST_DELAY_SECS : f64 = 0.35 ;
7068
7169#[ link( name = "CoreGraphics" , kind = "framework" ) ]
@@ -1343,15 +1341,9 @@ impl WindowOps for Window {
13431341 match view. native_fullscreen_target . get ( ) {
13441342 // Enter fullscreen: keep hidden for whole transition to avoid text scale pop.
13451343 Some ( true ) => return true ,
1346- // Exit fullscreen: reveal sooner so content comes back faster.
1347- Some ( false ) => {
1348- if let Some ( until) = view. transition_hide_until . get ( ) {
1349- if Instant :: now ( ) < until {
1350- return true ;
1351- }
1352- view. transition_hide_until . set ( None ) ;
1353- }
1354- }
1344+ // Exit fullscreen: avoid showing a rectangular placeholder
1345+ // during the restore animation.
1346+ Some ( false ) => view. transition_hide_until . set ( None ) ,
13551347 None => return true ,
13561348 }
13571349 }
@@ -1497,7 +1489,6 @@ impl WindowInner {
14971489 . native_fullscreen_transition_start
14981490 . set ( Some ( Instant :: now ( ) ) ) ;
14991491 }
1500- self . arm_transition_content_hide ( NATIVE_EXIT_HIDE_CONTENT_MS , "native_pre_exit" , true ) ;
15011492 self . toggle_native_fullscreen ( ) ;
15021493 true
15031494 } else {
@@ -2682,25 +2673,6 @@ impl WindowView {
26822673 }
26832674 }
26842675
2685- fn schedule_transition_unhide_repaint ( window_id : usize , duration_ms : u64 ) {
2686- promise:: spawn:: spawn ( async move {
2687- async_io:: Timer :: after ( Duration :: from_millis ( duration_ms) ) . await ;
2688- Connection :: with_window_inner ( window_id, move |inner| {
2689- if let Some ( window_view) = WindowView :: get_this ( unsafe { & * * inner. view } ) {
2690- let mut state = window_view. inner . borrow_mut ( ) ;
2691- state. paint_throttled = false ;
2692- state. invalidated = true ;
2693- state. events . dispatch ( WindowEvent :: NeedRepaint ) ;
2694- }
2695- unsafe {
2696- let _: ( ) = msg_send ! [ * inner. view, setNeedsDisplay: YES ] ;
2697- }
2698- Ok ( ( ) )
2699- } ) ;
2700- } )
2701- . detach ( ) ;
2702- }
2703-
27042676 // Called by the inputContext manager when the IME processes events.
27052677 // We need to translate the selector back into appropriate key
27062678 // sequences
@@ -3814,21 +3786,9 @@ impl WindowView {
38143786 this. native_fullscreen_transition_active . set ( true ) ;
38153787 this. native_fullscreen_target . set ( Some ( false ) ) ;
38163788 this. native_fullscreen_transition_start . set ( Some ( now) ) ;
3789+ this. transition_hide_until . set ( None ) ;
38173790 this. inner . borrow_mut ( ) . live_resizing = true ;
38183791
3819- // Native exit can be triggered by multiple entry points.
3820- // Arm the same short hide window here so all paths stay consistent.
3821- let should_arm_hide = this
3822- . transition_hide_until
3823- . get ( )
3824- . map ( |until| until <= now)
3825- . unwrap_or ( true ) ;
3826- if should_arm_hide {
3827- this. transition_hide_until . set ( Some (
3828- now + Duration :: from_millis ( NATIVE_EXIT_HIDE_CONTENT_MS ) ,
3829- ) ) ;
3830- }
3831-
38323792 if let Ok ( mut inner) = this. inner . try_borrow_mut ( ) {
38333793 inner. paint_throttled = false ;
38343794 inner. invalidated = true ;
@@ -3847,13 +3807,9 @@ impl WindowView {
38473807 extern "C" fn did_exit_fullscreen ( this : & mut Object , _sel : Sel , _notification : id ) {
38483808 let view_id = this as * mut Object ;
38493809 if let Some ( this) = Self :: get_this ( this) {
3850- let window_id = this. inner . borrow ( ) . window_id ;
38513810 this. native_fullscreen_transition_active . set ( false ) ;
38523811 this. native_fullscreen_target . set ( None ) ;
3853- this. transition_hide_until . set ( Some (
3854- Instant :: now ( ) + Duration :: from_millis ( NATIVE_EXIT_POST_HIDE_CONTENT_MS ) ,
3855- ) ) ;
3856- Self :: schedule_transition_unhide_repaint ( window_id, NATIVE_EXIT_POST_HIDE_CONTENT_MS ) ;
3812+ this. transition_hide_until . set ( None ) ;
38573813 if let Ok ( mut inner) = this. inner . try_borrow_mut ( ) {
38583814 inner. live_resizing = true ;
38593815 }
0 commit comments