[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
Mon Jul 26 19:49:15 CEST 2010


vlc/vlc-1.1 | branch: master | Juho Vähä-Herttua <juhovh at iki.fi> | Wed Jul 21 16:54:25 2010 +0300| [7cc5ef0d9f32388c37a2be4e4945a8f7d23eb9da] | committer: Rémi Duraffort 

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>
(cherry picked from commit 378c80277b249ab3c9545c0d11da29e464ccc48f)

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=7cc5ef0d9f32388c37a2be4e4945a8f7d23eb9da
---

 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 3394a77..ac1bd18 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