Ken Thomases : winemac: Allow programmatic changes of the window frame even if a window is disabled (prevented from resizing).
Alexandre Julliard
julliard at winehq.org
Mon Dec 30 13:06:00 CST 2013
Module: wine
Branch: master
Commit: 0137b07973d86d288265a25a1f55956c6b0cbe3f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0137b07973d86d288265a25a1f55956c6b0cbe3f
Author: Ken Thomases <ken at codeweavers.com>
Date: Sun Dec 29 21:33:36 2013 -0600
winemac: Allow programmatic changes of the window frame even if a window is disabled (prevented from resizing).
---
dlls/winemac.drv/cocoa_window.m | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index c8c1e90..f051934 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -1231,6 +1231,16 @@ static inline NSUInteger adjusted_modifiers_for_option_behavior(NSUInteger modif
BOOL equalSizes = NSEqualSizes(frame.size, oldFrame.size);
BOOL needEnableScreenUpdates = FALSE;
+ if (disabled)
+ {
+ // Allow the following calls to -setFrame:display: to work even
+ // if they would violate the content size constraints. This
+ // shouldn't be necessary since the content size constraints are
+ // documented to not constrain that method, but it seems to be.
+ [self setContentMinSize:NSZeroSize];
+ [self setContentMaxSize:NSMakeSize(FLT_MAX, FLT_MAX)];
+ }
+
if (equalSizes && [[self childWindows] count])
{
// If we change the window frame such that the origin moves
@@ -1249,6 +1259,11 @@ static inline NSUInteger adjusted_modifiers_for_option_behavior(NSUInteger modif
}
[self setFrame:frame display:YES];
+ if (disabled)
+ {
+ [self setContentMinSize:contentRect.size];
+ [self setContentMaxSize:contentRect.size];
+ }
if (needEnableScreenUpdates)
NSEnableScreenUpdates();
More information about the wine-cvs
mailing list