Problem:
I have one window mainWindow and another childWindow
added to mainWindow
.
childWindow is kind of WindowExt
class. This class
That’s a Cocoa design decision: windows without title or resize bar cannot become key window by default.
If you want a titleless window to be able to become a key window, you need to create a subclass of NSWindow
and override -canBecomeKeyWindow
as follows:
- (BOOL)canBecomeKeyWindow {
return YES;
}
you can set the style mask to NSBorderlessWindowMask
in order to make it borderless