Ken Thomases : winemac: Reenable window autodisplay when the frame is set and redisplayed.

Alexandre Julliard julliard at winehq.org
Mon Mar 26 16:01:21 CDT 2018


Module: wine
Branch: master
Commit: 041f59350cd4f483fbfb1b899d61697e67080d26
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=041f59350cd4f483fbfb1b899d61697e67080d26

Author: Ken Thomases <ken at codeweavers.com>
Date:   Sun Mar 25 20:45:22 2018 -0500

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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
             [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)




More information about the wine-cvs mailing list