From 26a74c664d6d4d16224f1ecc7461fd02e09645d8 Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Thu, 4 Apr 2013 14:26:01 -0500 Subject: [PATCH] winemac: Tell Cocoa to preserve our window content during live resizing. --- dlls/winemac.drv/cocoa_window.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 43be348d015..99111953c26 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -277,6 +277,18 @@ - (BOOL) acceptsFirstMouse:(NSEvent*)theEvent 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