]> git.sesse.net Git - vlc/commitdiff
macosx: move fullscreen-related method to VideoWindowCommon class
authorDavid Fuhrmann <david.fuhrmann@googlemail.com>
Thu, 6 Jun 2013 19:05:55 +0000 (21:05 +0200)
committerDavid Fuhrmann <david.fuhrmann@googlemail.com>
Thu, 6 Jun 2013 19:10:12 +0000 (21:10 +0200)
No functional changes, code is still inactive

modules/gui/macosx/MainWindow.m
modules/gui/macosx/Windows.m

index a3f2cfece5e55573ebba5df2834b12d50627f2c1..63b7bb8eaf1eb96eb458b67ead6bdc8c2f0951d0 100644 (file)
@@ -813,40 +813,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 }
 
-- (void)makeKeyAndOrderFront: (id)sender
-{
-    /* Hack
-     * when we exit fullscreen and fade out, we may endup in
-     * having a window that is faded. We can't have it fade in unless we
-     * animate again. */
-
-    if (!b_window_is_invisible) {
-        /* Make sure we don't do it too much */
-        [super makeKeyAndOrderFront: sender];
-        return;
-    }
-
-    [super setAlphaValue:0.0f];
-    [super makeKeyAndOrderFront: sender];
-
-    NSMutableDictionary * dict = [[NSMutableDictionary alloc] initWithCapacity:2];
-    [dict setObject:self forKey:NSViewAnimationTargetKey];
-    [dict setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey];
-
-    o_makekey_anim = [[NSViewAnimation alloc] initWithViewAnimations:@[dict]];
-    [dict release];
-
-    [o_makekey_anim setAnimationBlockingMode: NSAnimationNonblocking];
-    [o_makekey_anim setDuration: 0.1];
-    [o_makekey_anim setFrameRate: 30];
-    [o_makekey_anim setDelegate: self];
-
-    [o_makekey_anim startAnimation];
-    b_window_is_invisible = NO;
-
-    /* fullscreenAnimation will be unlocked when animation ends */
-}
-
 #pragma mark -
 #pragma mark split view delegate
 - (CGFloat)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)dividerIndex
index 2b50dad6e3f0906c52923cf74ef7bb948f9a7a96..a2845f5feaf18aced8cd1d85d59f30bbce74a52d 100644 (file)
         [self hasBecomeFullscreen];
 }
 
+- (void)orderOut:(id)sender
+{
+    [super orderOut:sender];
+
+    /*
+     * TODO reimplement leaveFullscreenAndFadeOut:YES, or remove code
+     * and the hack below
+    
+    if (![NSStringFromClass([self class]) isEqualToString:@"VLCMainWindow"]) {
+        [self leaveFullscreenAndFadeOut:YES];
+    }
+     */
+}
+
+- (void)makeKeyAndOrderFront: (id)sender
+{
+    /* Hack
+     * when we exit fullscreen and fade out, we may endup in
+     * having a window that is faded. We can't have it fade in unless we
+     * animate again. */
+
+    if (!b_window_is_invisible) {
+        /* Make sure we don't do it too much */
+        [super makeKeyAndOrderFront: sender];
+        return;
+    }
+
+    [super setAlphaValue:0.0f];
+    [super makeKeyAndOrderFront: sender];
+
+    NSMutableDictionary * dict = [[NSMutableDictionary alloc] initWithCapacity:2];
+    [dict setObject:self forKey:NSViewAnimationTargetKey];
+    [dict setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey];
+
+    o_makekey_anim = [[NSViewAnimation alloc] initWithViewAnimations:@[dict]];
+    [dict release];
+
+    [o_makekey_anim setAnimationBlockingMode: NSAnimationNonblocking];
+    [o_makekey_anim setDuration: 0.1];
+    [o_makekey_anim setFrameRate: 30];
+    [o_makekey_anim setDelegate: self];
+
+    [o_makekey_anim startAnimation];
+    b_window_is_invisible = NO;
+
+    /* fullscreenAnimation will be unlocked when animation ends */
+}
+
+
 #pragma mark -
 #pragma mark Accessibility stuff