Commit 7cc5ef0d authored by Juho Vähä-Herttua's avatar Juho Vähä-Herttua Committed by Rémi Duraffort

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>
(cherry picked from commit 378c8027)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent 49cd3412
...@@ -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