[vlc-commits] macosx: move fullscreen-related method to VideoWindowCommon class
David Fuhrmann
git at videolan.org
Thu Jun 6 21:11:13 CEST 2013
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Thu Jun 6 21:05:55 2013 +0200| [f6c636aeaff535dcab1e8e99e7c40eca874ec6bf] | committer: David Fuhrmann
macosx: move fullscreen-related method to VideoWindowCommon class
No functional changes, code is still inactive
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f6c636aeaff535dcab1e8e99e7c40eca874ec6bf
---
modules/gui/macosx/MainWindow.m | 34 ---------------------------
modules/gui/macosx/Windows.m | 49 +++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 34 deletions(-)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index a3f2cfe..63b7bb8 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -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
diff --git a/modules/gui/macosx/Windows.m b/modules/gui/macosx/Windows.m
index 2b50dad..a2845f5 100644
--- a/modules/gui/macosx/Windows.m
+++ b/modules/gui/macosx/Windows.m
@@ -1049,6 +1049,55 @@
[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
More information about the vlc-commits
mailing list