winemac.drv: Move GL context update code to -viewWillDraw method.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Chip Davis 2021-09-01 09:28:22 -05:00 committed by Alexandre Julliard
parent 01f027b2db
commit cad2a7c8e1
1 changed files with 7 additions and 2 deletions

View File

@ -491,9 +491,9 @@ - (BOOL) isFlipped
return YES;
}
- (void) drawRect:(NSRect)rect
- (void) viewWillDraw
{
WineWindow* window = (WineWindow*)[self window];
[super viewWillDraw];
for (WineOpenGLContext* context in pendingGlContexts)
{
@ -506,6 +506,11 @@ - (void) drawRect:(NSRect)rect
}
[glContexts addObjectsFromArray:pendingGlContexts];
[pendingGlContexts removeAllObjects];
}
- (void) drawRect:(NSRect)rect
{
WineWindow* window = (WineWindow*)[self window];
if ([window contentView] != self)
return;