Commit 7515422f authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx intf/vout: respond correctly to VOUT_DISPLAY_CHANGE_FULLSCREEN (close #6464)

parent fad80b62
...@@ -183,6 +183,7 @@ ...@@ -183,6 +183,7 @@
/* fullscreen handling */ /* fullscreen handling */
- (void)showFullscreenController; - (void)showFullscreenController;
- (BOOL)isFullscreen; - (BOOL)isFullscreen;
- (void)updateFullscreen;
- (void)lockFullscreenAnimation; - (void)lockFullscreenAnimation;
- (void)unlockFullscreenAnimation; - (void)unlockFullscreenAnimation;
- (void)enterFullscreen; - (void)enterFullscreen;
...@@ -204,6 +205,7 @@ ...@@ -204,6 +205,7 @@
} }
- (BOOL)isFullscreen; - (BOOL)isFullscreen;
- (void)updateFullscreen;
- (void)customZoom:(id)sender; - (void)customZoom:(id)sender;
@end @end
...@@ -1511,6 +1511,11 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1511,6 +1511,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_fspanel fadeIn]; [o_fspanel fadeIn];
} }
- (void)updateFullscreen
{
[[VLCMain sharedInstance] fullscreenChanged];
}
- (BOOL)isFullscreen - (BOOL)isFullscreen
{ {
return b_fullscreen; return b_fullscreen;
...@@ -2240,6 +2245,16 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -2240,6 +2245,16 @@ static VLCMainWindow *_o_sharedInstance = nil;
} }
} }
- (IBAction)fullscreen:(id)sender
{
[[VLCCoreInteraction sharedInstance] toggleFullscreen];
}
- (void)updateFullscreen
{
[[VLCMain sharedInstance] fullscreenChanged];
}
- (BOOL)isFullscreen - (BOOL)isFullscreen
{ {
return [[VLCMainWindow sharedInstance] isFullscreen]; return [[VLCMainWindow sharedInstance] isFullscreen];
......
...@@ -315,7 +315,7 @@ static int Control (vout_display_t *vd, int query, va_list ap) ...@@ -315,7 +315,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
case VOUT_DISPLAY_CHANGE_FULLSCREEN: case VOUT_DISPLAY_CHANGE_FULLSCREEN:
{ {
NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
[[sys->glView window] performSelectorOnMainThread:@selector(fullscreen:) withObject: nil waitUntilDone:NO]; [[sys->glView window] performSelectorOnMainThread:@selector(updateFullscreen) withObject: nil waitUntilDone:NO];
[o_pool release]; [o_pool release];
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
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