[vlc-commits] macosx vout: fix framing issue when video opens in detached view

David Fuhrmann git at videolan.org
Mon Jun 4 10:43:19 CEST 2012


vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Mon Jun  4 10:23:37 2012 +0200| [18acb2b00755b252a7ae41b621221c77ef77fc45] | committer: Felix Paul Kühne

macosx vout: fix framing issue when video opens in detached view
(cherry picked from commit 8405c0784c4e8f15ff6d38babc1dbfab61e9436c)

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=18acb2b00755b252a7ae41b621221c77ef77fc45
---

 modules/video_output/macosx.m |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index a956be3..e399082 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -188,7 +188,7 @@ static int Open (vlc_object_t *this)
     {
         NSView *parentView = container;
         [parentView performSelectorOnMainThread:@selector(addSubview:) withObject:sys->glView waitUntilDone:NO];
-        [sys->glView performSelectorOnMainThread:@selector(setFrameWithValue:) withObject:[NSValue valueWithRect:[parentView bounds]] waitUntilDone:NO];
+        [sys->glView performSelectorOnMainThread:@selector(setFrameToBoundsOfView:) withObject:[NSValue valueWithPointer:parentView] waitUntilDone:NO];
     }
     else
     {
@@ -508,9 +508,10 @@ static void OpenglSwap (vlc_gl_t *gl)
 /**
  * Gets called by the Open() method.
  */
-- (void)setFrameWithValue:(NSValue *)value
+- (void)setFrameToBoundsOfView:(NSValue *)value
 {
-    [self setFrame:[value rectValue]];
+    NSView *parentView = [value pointerValue];
+    [self setFrame:[parentView bounds]];
 }
 
 /**



More information about the vlc-commits mailing list