Fixed button actions which were sent to the button itself when the target is

the first responder. We don't give anymore the first responder status to a 
button on a click.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29471 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
qmathe 2010-02-03 19:12:02 +00:00
parent ec9518eb66
commit 613b3813bd
2 changed files with 12 additions and 1 deletions

View file

@ -3645,7 +3645,12 @@ resetCursorRectsForView(NSView *theView)
{
DESTROY(_lastView);
}
if (_firstResponder != v)
// Don't make buttons first responder otherwise they cannot
// send actions to the current first responder.
// TODO: First responder status update would more cleanly
// handled by -mouseDown in each control subclass (Mac OS X
// seems to do that).
if (_firstResponder != v && ![v isKindOfClass: [NSButton class]])
{
// Only try to set first responder, when the view wants it.
if ([v acceptsFirstResponder] && ![self makeFirstResponder: v])