I have a subclass of NSBorderlessWindow NSWindow with a transparent and opaque background (so it is not rectangular in appearance). I added my own buttons to function as the close and minimize buttons when I click on them, but for some reason the window will not respond to CMD-W or CMD-M, as usual. I have a set of NSWindow subclasses to return YES in canBecomeKeyWindow and canBecomeMainWindow.
My NIB still has all the standard menu items that are when you create a new project, including the Minimize item in the Window menu with the default CMD-M shortcut. He connected to send performMiniaturize: to the first responder. However, it is not turned on when the application is running, so it seems that it should request a window if it can be minimized and the window says βnoβ or something like that. (I'm still very new to OSX / Cocoa.)
What am I missing?
In addition, and perhaps this is related, my borderless window has an included shadow, but unlike the usual captioned window, when I make my window an active / front window by clicking on it, the shadow does not change. Typically, an OSX-oriented window has a slightly larger / darker shadow to highlight it more, but mine never changes the shadow. It is like I am missing something so that the OS sees this window as a real / normal / main window or something else, and as a result I lose the shadow change and CMD-W / CMD-M.
source share