Commit fe53c6cd authored by Felix Paul Kühne's avatar Felix Paul Kühne

vout_macosx: check whether the receiving window can respond to non-standard...

vout_macosx: check whether the receiving window can respond to non-standard calls prior to calling them (close #6034)
parent e49b9638
...@@ -315,10 +315,16 @@ static int Control (vout_display_t *vd, int query, va_list ap) ...@@ -315,10 +315,16 @@ 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];
id window = [sys->glView window];
if ([window respondsToSelector:@selector(updateFullscreen)])
{
[[sys->glView window] performSelectorOnMainThread:@selector(updateFullscreen) 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;
} }
[o_pool release];
return VLC_EGENERIC;
}
case VOUT_DISPLAY_CHANGE_WINDOW_STATE: case VOUT_DISPLAY_CHANGE_WINDOW_STATE:
{ {
NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
...@@ -560,11 +566,16 @@ static void OpenglSwap(vlc_gl_t *gl) ...@@ -560,11 +566,16 @@ static void OpenglSwap(vlc_gl_t *gl)
*/ */
- (void)setWindowFrameWithValue:(NSValue *)value - (void)setWindowFrameWithValue:(NSValue *)value
{ {
if (![[self window] isFullscreen]) id window = [self window];
{
NSRect frame = [value rectValue]; NSRect frame = [value rectValue];
[[self window] setFrame:frame display:YES animate: YES];
if ([window respondsToSelector:@selector(isFullscreen)])
{
if (!(BOOL)[[self window] isFullscreen])
[[self window] setFrame:frame display:YES animate:YES];
} }
else
[[self window] setFrame:frame display:YES animate:YES];
} }
/** /**
......
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