Reputation: 1506
I can send the message makeKeyAndOrderFront: to make a window active. However, if I send this to a window without a title bar, it doesnt make it active. Is there any way to make a window without a title bar active?
Upvotes: 4
Views: 917
Reputation: 46020
You need to override -canBecomeKeyWindow
in your NSWindow
subclass to return YES
.
As per the docs:
Attempts to make the window the key window are abandoned if this method returns NO. The NSWindow implementation returns YES if the window has a title bar or a resize bar, or NO otherwise.
Upvotes: 4