|
From: | Josh Freeman |
Subject: | Re: GUI incompatibility |
Date: | Thu, 14 May 2020 06:22:46 -0400 |
I could fix the problem under GNUstep by simply commenting out/* if (_firstResponder != v && ![v isKindOfClass: [NSButton class]]){// Only try to set first responder, when the view wants it. if ([v acceptsFirstResponder] && ![self makeFirstResponder: v]){ return; } } */Does anything speak against submitting this change into the public tree?
That logic should remain - it's useful for when the clicked responder wants first responder status but the current first responder refuses to yield it; In that case, it's probably better to return without passing along the mouseDown event, otherwise the clicked responder will assume it's active & receiving key events, while the current first responder is preventing its own deactivation.
That doesn't seem to be the cause of the issue anyway; The different behavior between GNUstep & OS X appears to be due to mismatched return values of -[NSWindow makeFirstResponder:] - if the passed responder refuses first responder status, GNUstep's version returns NO, but OS X's version returns YES:
https://developer.apple.com/documentation/appkit/nswindow/1419366-makefirstresponder?language=objc Cheers, Josh
[Prev in Thread] | Current Thread | [Next in Thread] |