[vlc-commits] commit: osx: Fix a bug where glView frame doesn' t get set if NSView parent is used ( Juho Vähä-Herttua )
git at videolan.org
git at videolan.org
Thu Jul 22 12:14:51 CEST 2010
vlc | branch: master | Juho Vähä-Herttua <juhovh at iki.fi> | Wed Jul 21 16:54:25 2010 +0300| [378c80277b249ab3c9545c0d11da29e464ccc48f] | committer: Jean-Baptiste Kempf
osx: Fix a bug where glView frame doesn't get set if NSView parent is used
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=378c80277b249ab3c9545c0d11da29e464ccc48f
---
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 29cde85..c1571b3 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
{
@@ -375,6 +375,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).
*/
More information about the vlc-commits
mailing list