[vlc-commits] macosx: simplify ea98fcfc
Felix Paul Kühne
git at videolan.org
Wed Dec 26 12:40:20 CET 2012
vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Dec 26 12:18:33 2012 +0100| [5b9bf21dcdd07d98c31979d47408200659849860] | committer: Felix Paul Kühne
macosx: simplify ea98fcfc
thanks to David for the feedback
(cherry picked from commit 9322e135d79228221a0f52d4a745b43cb087be3f)
Conflicts:
modules/gui/macosx/MainWindow.m
modules/gui/macosx/VideoView.m
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=5b9bf21dcdd07d98c31979d47408200659849860
---
modules/gui/macosx/MainWindow.m | 9 +++++++++
modules/gui/macosx/VideoView.m | 29 +----------------------------
2 files changed, 10 insertions(+), 28 deletions(-)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 1937823..9b9d9b4 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -2252,6 +2252,15 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_fspanel setVoutWasUpdated: (int)[[self screen] displayID]];
[o_fspanel setActive: nil];
+
+ NSArray *subviews = [[self videoView] subviews];
+ NSUInteger count = [subviews count];
+
+ for (NSUInteger x = 0; x < count; x++) {
+ if ([[subviews objectAtIndex:x] respondsToSelector:@selector(reshape)])
+ [[subviews objectAtIndex:x] reshape];
+ }
+
}
- (void)windowWillExitFullScreen:(NSNotification *)notification
diff --git a/modules/gui/macosx/VideoView.m b/modules/gui/macosx/VideoView.m
index 3766d49..f15b9b7 100644
--- a/modules/gui/macosx/VideoView.m
+++ b/modules/gui/macosx/VideoView.m
@@ -14,7 +14,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -68,42 +68,15 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (void)dealloc
{
- [[NSNotificationCenter defaultCenter] removeObserver: self];
-
[self unregisterDraggedTypes];
[super dealloc];
}
- (void)awakeFromNib
{
-#ifdef MAC_OS_X_VERSION_10_7
- if (!OSX_SNOW_LEOPARD) {
- [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(osWillChangeFullScreenStatus:) name: NSWindowWillEnterFullScreenNotification object: nil];
- [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(osWillChangeFullScreenStatus:) name: NSWindowDidEnterFullScreenNotification object: nil];
- [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(osWillChangeFullScreenStatus:) name: NSWindowWillExitFullScreenNotification object: nil];
- }
-#endif
-
[self registerForDraggedTypes:[NSArray arrayWithObject: NSFilenamesPboardType]];
}
-- (void)osWillChangeFullScreenStatus:(NSNotification *)notification
-{
- playlist_t *p_playlist = pl_Get(VLCIntf);
- if ([notification.name isEqualToString:@"NSWindowWillEnterFullScreenNotification"] || [notification.name isEqualToString:@"NSWindowDidEnterFullScreenNotification"])
- var_SetBool(p_playlist, "fullscreen", 1);
- else
- var_SetBool(p_playlist, "fullscreen", 0);
-
- NSArray *subviews = [self subviews];
- NSUInteger count = [subviews count];
-
- for (NSUInteger x = 0; x < count; x++) {
- if ([[subviews objectAtIndex:x] respondsToSelector:@selector(reshape)])
- [[subviews objectAtIndex:x] reshape];
- }
-}
-
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
if ((NSDragOperationGeneric & [sender draggingSourceOperationMask]) == NSDragOperationGeneric)
More information about the vlc-commits
mailing list