From cad2a7c8e1ad97eaf8bbb7479f8c5ad8dca8a10d Mon Sep 17 00:00:00 2001 From: Chip Davis Date: Wed, 1 Sep 2021 09:28:22 -0500 Subject: [PATCH] winemac.drv: Move GL context update code to -viewWillDraw method. Signed-off-by: Chip Davis Signed-off-by: Alexandre Julliard --- dlls/winemac.drv/cocoa_window.m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 013af035a12..677dc07ae16 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -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;