Ken Thomases : winemac: Tell Cocoa to preserve our window content during live resizing.

Alexandre Julliard julliard at winehq.org
Fri Apr 5 14:02:15 CDT 2013


Module: wine
Branch: master
Commit: 26a74c664d6d4d16224f1ecc7461fd02e09645d8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=26a74c664d6d4d16224f1ecc7461fd02e09645d8

Author: Ken Thomases <ken at codeweavers.com>
Date:   Thu Apr  4 14:26:01 2013 -0500

winemac: Tell Cocoa to preserve our window content during live resizing.

---

 dlls/winemac.drv/cocoa_window.m |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index 43be348..9911195 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -277,6 +277,18 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
         return YES;
     }
 
+    - (BOOL) preservesContentDuringLiveResize
+    {
+        // Returning YES from this tells Cocoa to keep our view's content during
+        // a Cocoa-driven resize.  In theory, we're also supposed to override
+        // -setFrameSize: to mark exposed sections as needing redisplay, but
+        // user32 will take care of that in a roundabout way.  This way, we don't
+        // redraw until the window surface is flushed.
+        //
+        // This doesn't do anything when we resize the window ourselves.
+        return YES;
+    }
+
 @end
 
 




More information about the wine-cvs mailing list