]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/embeddedwindow.m
macosx: Remove a weird already_locked bool. (that removes a runtime warning from...
[vlc] / modules / gui / macosx / embeddedwindow.m
index 582f8ac7c9d6d4c19287f6e57524049c25b29255..4ce60e655c601168d7573930f2b10048f250d38b 100644 (file)
     /* Not fullscreen when we wake up */
     [o_btn_fullscreen setState: NO];
     b_fullscreen = NO;
-    /* Use a recursive lock to be able to trigger enter/leavefullscreen
-     * in middle of an animation, providing that the enter/leave functions
-     * are called from the same thread */
-    o_animation_lock = [[NSRecursiveLock alloc] init];
-    b_animation_lock_alreadylocked = NO;
 }
 
 - (void)controlTintChanged
     {
         /* We were already fullscreen nothing to do when NSAnimation
          * is not supported */
-        b_animation_lock_alreadylocked = NO;
         [self unlockFullscreenAnimation];
         return;
     }
     {
         /* Make sure we are hidden */
         [super orderOut: self];
-        b_animation_lock_alreadylocked = NO;
         [self unlockFullscreenAnimation];
         return;
     }
         [o_fullscreen_anim2 release];
     }
  
-     /* This is a recursive lock. If we are already in the middle of an animation we
-     * unlock it. We don't add an extra locking here, because enter/leavefullscreen
-     * are executed always in the same thread */
-    if (b_animation_lock_alreadylocked)
-        [self unlockFullscreenAnimation];
-    b_animation_lock_alreadylocked = YES;
-
     if ([screen isMainScreen])
         SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
 
     /* Don't do anything if o_fullscreen_window is already closed */
     if (!o_fullscreen_window)
     {
-        b_animation_lock_alreadylocked = NO;
         [self unlockFullscreenAnimation];
         return;
     }
         [o_fullscreen_anim2 release];
     }
 
-    /* This is a recursive lock. If we are already in the middle of an animation we
-     * unlock it. We don't add an extra locking here, because enter/leavefullscreen
-     * are executed always in the same thread */
-    if (b_animation_lock_alreadylocked)
-        [self unlockFullscreenAnimation];
-    b_animation_lock_alreadylocked = YES;
-
     frame = [[o_temp_view superview] convertRect: [o_temp_view frame] toView: nil]; /* Convert to Window base coord */
     frame.origin.x += [self frame].origin.x;
     frame.origin.y += [self frame].origin.y;
 
     [o_fullscreen_window release];
     o_fullscreen_window = nil;
-    b_animation_lock_alreadylocked = NO;
     [self unlockFullscreenAnimation];
 }