From d74e90080ab1b8820d15b84ab3dce6fe9b4c0568 Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Sun, 17 Feb 2013 19:28:19 -0600 Subject: [PATCH] winemac: Don't set Cocoa window frame to be zero-sized. --- dlls/winemac.drv/cocoa_window.m | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 2247d32235f..d8ea9edaba0 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -429,14 +429,17 @@ - (BOOL) setFrameIfOnScreen:(NSRect)contentRect [self doOrderOut]; } - oldFrame = [self frame]; - frame = [self frameRectForContentRect:contentRect]; - if (!NSEqualRects(frame, oldFrame)) + if (!NSIsEmptyRect(contentRect)) { - if (NSEqualSizes(frame.size, oldFrame.size)) - [self setFrameOrigin:frame.origin]; - else - [self setFrame:frame display:YES]; + oldFrame = [self frame]; + frame = [self frameRectForContentRect:contentRect]; + if (!NSEqualRects(frame, oldFrame)) + { + if (NSEqualSizes(frame.size, oldFrame.size)) + [self setFrameOrigin:frame.origin]; + else + [self setFrame:frame display:YES]; + } } if (on_screen)