Main NSWindow shadow doesn't change like child windows

我们两清 提交于 2019-12-07 07:27:15

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!