mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
winemac: Allow programmatic changes of the window frame even if a window is disabled (prevented from resizing).
This commit is contained in:
parent
8876751e93
commit
0137b07973
1 changed files with 15 additions and 0 deletions
|
@ -1231,6 +1231,16 @@ - (void) setFrameFromWine:(NSRect)contentRect
|
|||
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 @@ - (void) setFrameFromWine:(NSRect)contentRect
|
|||
}
|
||||
|
||||
[self setFrame:frame display:YES];
|
||||
if (disabled)
|
||||
{
|
||||
[self setContentMinSize:contentRect.size];
|
||||
[self setContentMaxSize:contentRect.size];
|
||||
}
|
||||
|
||||
if (needEnableScreenUpdates)
|
||||
NSEnableScreenUpdates();
|
||||
|
|
Loading…
Reference in a new issue