[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NSWindow bug fix,
From: |
Andreas Höschler |
Subject: |
NSWindow bug fix, |
Date: |
Fri, 5 May 2006 14:49:58 +0200 |
Hello,
please replace the following NSWindow method in the GNUstep source tree.
[aWindow makeFirstResponder:nil] should send resignFirstResponder to
current responder.
- (BOOL) makeFirstResponder: (NSResponder*)aResponder
{
if (_firstResponder == aResponder)
return YES;
if (aResponder != nil && [aResponder isKindOfClass:responderClass] ==
NO)
return NO; // <--
if (aResponder != nil && [aResponder acceptsFirstResponder] == NO)
return NO; // <--
/* So that the implementation of -resignFirstResponder in
_firstResponder might ask for what will be the new first
responder by calling our method _futureFirstResponder */
_futureFirstResponder = aResponder;
/*
* If there is a first responder tell it to resign.
* Change only if it replies YES.
*/
if ((_firstResponder) && (![_firstResponder resignFirstResponder]))
return NO;
_firstResponder = aResponder;
if (![_firstResponder becomeFirstResponder])
{
_firstResponder = self;
[_firstResponder becomeFirstResponder];
return NO;
}
return YES;
}
Regards,
Andreas
- NSWindow bug fix,,
Andreas Höschler <=