From 378c80277b249ab3c9545c0d11da29e464ccc48f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Juho=20V=C3=A4h=C3=A4-Herttua?= Date: Wed, 21 Jul 2010 16:54:25 +0300 Subject: [PATCH] osx: Fix a bug where glView frame doesn't get set if NSView parent is used Signed-off-by: Jean-Baptiste Kempf --- modules/video_output/macosx.m | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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). -- 2.39.5