mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 05:40:37 +00:00
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:
parent
474076b08a
commit
6d009268eb
2 changed files with 21 additions and 7 deletions
|
@ -2095,7 +2095,7 @@ resetCursorRectsForView(NSView *theView)
|
|||
|
||||
_f.is_miniaturized = YES;
|
||||
/* Make sure we're not defered */
|
||||
if(_windowNum == 0)
|
||||
if (_windowNum == 0)
|
||||
{
|
||||
[self _initBackendWindow: _frame];
|
||||
}
|
||||
|
@ -2187,17 +2187,25 @@ resetCursorRectsForView(NSView *theView)
|
|||
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
|
||||
{
|
||||
if (!(_styleMask & (NSIconWindowMask | NSMiniWindowMask)))
|
||||
{
|
||||
// FIXME: The button should be highlighted
|
||||
[self miniaturize: sender];
|
||||
}
|
||||
else
|
||||
if ((!(_styleMask & NSMiniaturizableWindowMask))
|
||||
|| (_styleMask & (NSIconWindowMask | NSMiniWindowMask)))
|
||||
{
|
||||
NSBeep();
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: The button should be highlighted
|
||||
[self miniaturize: sender];
|
||||
}
|
||||
|
||||
- (int) resizeFlags
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue