mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 21:20:38 +00:00
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:
parent
67baee0c6d
commit
61cc498161
7 changed files with 94 additions and 3 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue