[PATCH] winemac: Reenable window autodisplay when the frame is set and redisplayed.
Cocoa will draw the window frame immediately but if autodisplay of its content view is disabled, that may leave the content area black briefly. This change avoids that flicker. Signed-off-by: Ken Thomases <ken(a)codeweavers.com> --- dlls/winemac.drv/cocoa_window.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 991db57..b94b774 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -2456,6 +2456,20 @@ - (void) displayIfNeeded [self setAutodisplay:NO]; } + - (void) setFrame:(NSRect)frameRect display:(BOOL)flag + { + if (flag) + [self setAutodisplay:YES]; + [super setFrame:frameRect display:flag]; + } + + - (void) setFrame:(NSRect)frameRect display:(BOOL)displayFlag animate:(BOOL)animateFlag + { + if (displayFlag) + [self setAutodisplay:YES]; + [super setFrame:frameRect display:displayFlag animate:animateFlag]; + } + - (void) windowDidDrawContent { if (!drawnSinceShown) -- 2.10.2
participants (1)
-
Ken Thomases