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;