Commit 378c8027 authored by Juho Vähä-Herttua's avatar Juho Vähä-Herttua Committed by Jean-Baptiste Kempf

osx: Fix a bug where glView frame doesn't get set if NSView parent is used

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent c422b773
...@@ -150,7 +150,7 @@ static int Open(vlc_object_t *this) ...@@ -150,7 +150,7 @@ static int Open(vlc_object_t *this)
{ {
NSView *parentView = container; NSView *parentView = container;
[parentView performSelectorOnMainThread:@selector(addSubview:) withObject:sys->glView waitUntilDone:NO]; [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 else
{ {
...@@ -374,6 +374,14 @@ static void OpenglSwap(vout_opengl_t *gl) ...@@ -374,6 +374,14 @@ static void OpenglSwap(vout_opengl_t *gl)
return self; return self;
} }
/**
* Gets called by the Open() method.
*/
- setFrameWithValue:(NSValue *)value
{
[self setFrame:[value rectValue]];
}
/** /**
* Gets called by the Close and Open methods. * Gets called by the Close and Open methods.
* (Non main thread). * (Non main thread).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment