]> git.sesse.net Git - vlc/commitdiff
osx: Fix a bug where glView frame doesn't get set if NSView parent is used
authorJuho Vähä-Herttua <juhovh@iki.fi>
Wed, 21 Jul 2010 13:54:25 +0000 (16:54 +0300)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 22 Jul 2010 10:15:15 +0000 (12:15 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/video_output/macosx.m

index 29cde854b132d8022ed92f96ccbdf587c58ba8e5..c1571b3f228e82b3520f224899ac5e6f86fea403 100644 (file)
@@ -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).