Commit 90237c30 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)
(cherry picked from commit fe53c6cd32682d52f740bc49767c5eab68632e51)
parent 32304937
......@@ -315,10 +315,16 @@ static int Control (vout_display_t *vd, int query, va_list ap)
case VOUT_DISPLAY_CHANGE_FULLSCREEN:
{
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];
[o_pool release];
return VLC_SUCCESS;
}
[o_pool release];
return VLC_EGENERIC;
}
case VOUT_DISPLAY_CHANGE_WINDOW_STATE:
{
NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
......@@ -560,11 +566,16 @@ static void OpenglSwap(vlc_gl_t *gl)
*/
- (void)setWindowFrameWithValue:(NSValue *)value
{
if (![[self window] isFullscreen])
{
id window = [self window];
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