You need to override -canBecomeKeyWindow
in a subclass of NSWindow
to return YES
.
In accordance with the documents:
Attempts to make the window a key window are abandoned if this method returns NO. The NSWindow implementation returns YES if the window has a title bar or a resize panel, or NO otherwise.
source share