I have a custom NSBorderlessWindowMask
window in my application that I show when user taps a certain hot key.
This window has a `NSTextField, that has to become first responder when the window shows up.
This window is not a main window, but it can take focus from the main window.
This what I do to show it and make it key:
[self.myCustomWindow makeKeyAndOrderFront:sender];
and then to set the first responder
[self.myTextField becomeFirstResponder];
Everything works as expected when the application is a frontmost application, but if it's not, the window appears, but doesn't become key and i have to click it to become active.
I override in my CustomWindow
class:
- (BOOL)canBecomeKeyWindow {
return YES;
}
What might be the problem?
Thanks!