From: Juho Vähä-Herttua Date: Wed, 21 Jul 2010 13:54:25 +0000 (+0300) Subject: osx: Fix a bug where glView frame doesn't get set if NSView parent is used X-Git-Tag: 1.2.0-pre1~5717 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=378c80277b249ab3c9545c0d11da29e464ccc48f;p=vlc osx: Fix a bug where glView frame doesn't get set if NSView parent is used Signed-off-by: Jean-Baptiste Kempf --- diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m index 29cde854b1..c1571b3f22 100644 --- a/modules/video_output/macosx.m +++ b/modules/video_output/macosx.m @@ -150,7 +150,7 @@ static int Open(vlc_object_t *this) { NSView *parentView = container; [parentView performSelectorOnMainThread:@selector(addSubview:) withObject:sys->glView waitUntilDone:NO]; - [sys->glView performSelectorOnMainThread:@selector(setFrame:) withObject:[NSValue valueWithRect:[parentView bounds]] waitUntilDone:NO]; + [sys->glView performSelectorOnMainThread:@selector(setFrameWithValue:) withObject:[NSValue valueWithRect:[parentView bounds]] waitUntilDone:NO]; } else { @@ -374,6 +374,14 @@ static void OpenglSwap(vout_opengl_t *gl) return self; } +/** + * Gets called by the Open() method. + */ +- setFrameWithValue:(NSValue *)value +{ + [self setFrame:[value rectValue]]; +} + /** * Gets called by the Close and Open methods. * (Non main thread).