Handle becomesKeyOnlyIfNeeded in NSPanel properly.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14508 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
alexm 2002-09-21 23:33:37 +00:00
parent 67baee0c6d
commit 61cc498161
7 changed files with 94 additions and 3 deletions

View file

@ -2742,6 +2742,9 @@ resetCursorRectsForView(NSView *theView)
switch (type)
{
case NSLeftMouseDown:
/*
Code shared with [NSPanel -sendEvent:], remember to update both places.
*/
{
BOOL wasKey = _f.is_key;
@ -2751,11 +2754,11 @@ resetCursorRectsForView(NSView *theView)
}
if (_f.has_closed == NO)
{
v = [_contentView hitTest: [theEvent locationInWindow]];
if (_f.is_key == NO)
{
[self makeKeyAndOrderFront: self];
}
v = [_contentView hitTest: [theEvent locationInWindow]];
if (_firstResponder != v)
{
[self makeFirstResponder: v];