Commit 5b9bf21d authored by Felix Paul Kühne's avatar 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
parent cab9d6cb
......@@ -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
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment