Patch to check style mask when miniaturising

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12462 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-02-09 08:58:37 +00:00
parent 474076b08a
commit 6d009268eb
2 changed files with 21 additions and 7 deletions

View file

@ -1,3 +1,9 @@
2002-02-09 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSWindow.m: ([performMiniaturize:]) patch to check style
mask by Jeff Teunissen <deek@d2dc.net> added.
Method documented.
Fri Feb 8 02:46:15 2002 Nicola Pero <n.pero@mi.flashnet.it> Fri Feb 8 02:46:15 2002 Nicola Pero <n.pero@mi.flashnet.it>
* Source/NSTextView.m ([-moveWordBackward:]): Simplified. * Source/NSTextView.m ([-moveWordBackward:]): Simplified.

View file

@ -2095,7 +2095,7 @@ resetCursorRectsForView(NSView *theView)
_f.is_miniaturized = YES; _f.is_miniaturized = YES;
/* Make sure we're not defered */ /* Make sure we're not defered */
if(_windowNum == 0) if (_windowNum == 0)
{ {
[self _initBackendWindow: _frame]; [self _initBackendWindow: _frame];
} }
@ -2187,17 +2187,25 @@ resetCursorRectsForView(NSView *theView)
return NO; return NO;
} }
/**
* Miniaturize the receiver ... as long as its style mask includes
* NSMiniaturizableWindowMask (and as long as the receiver is not an
* icon or mini window itsself). Calls -miniaturize to do this.<br />
* Beeps if the window can't be miniaturised.<br />
* Should ideally provide visual feedback (highlighting the miniaturize
* button as if it had been clicked) first ... but that's not yet implemented.
*/
- (void) performMiniaturize: (id)sender - (void) performMiniaturize: (id)sender
{ {
if (!(_styleMask & (NSIconWindowMask | NSMiniWindowMask))) if ((!(_styleMask & NSMiniaturizableWindowMask))
{ || (_styleMask & (NSIconWindowMask | NSMiniWindowMask)))
// FIXME: The button should be highlighted
[self miniaturize: sender];
}
else
{ {
NSBeep(); NSBeep();
return;
} }
// FIXME: The button should be highlighted
[self miniaturize: sender];
} }
- (int) resizeFlags - (int) resizeFlags