问题
The primary window in my app is borderless:
[self.window setStyleMask:NSBorderlessWindowMask];
From that window, I also open other child windows. When I click around between those other child windows I see the drop shadow of those child windows get darker/larger when that child window gets clicked and becomes the focused window. However, my main window's shadow doesn't change when it loses or gains focus. So, there isn't much user feedback to tell them that original primary window has become the focus again.
Do I need to override something in my borderless window subclass to enable the shadow changes? It has a shadow, it just doesn't get darker/larger when that window is the focus.
回答1:
The darker shadow is a behavior tied to the NSTitledWindowMask
so I don't believe that you can actually get this using the NSBorderlessWindowMask
.
来源:https://stackoverflow.com/questions/7657387/main-nswindow-shadow-doesnt-change-like-child-windows