[vlc-devel] [PATCH 7/8] osx: Fix a bug where glView frame doesn't get set if NSView parent is used
Juho Vähä-Herttua
juhovh at iki.fi
Wed Jul 21 15:54:25 CEST 2010
---
modules/video_output/macosx.m | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 4922516..e3a6dd4 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -165,7 +165,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
{
@@ -391,6 +391,14 @@ static void OpenglSwap(vout_opengl_t *gl)
}
/**
+ * Gets called by the Open() method.
+ */
+- setFrameWithValue:(NSValue *)value
+{
+ [self setFrame:[value rectValue]];
+}
+
+/**
* Gets called by the Close and Open methods.
* (Non main thread).
*/
--
1.7.0.4
More information about the vlc-devel
mailing list