简体   繁体   中英

Main NSWindow shadow doesn't change like child windows

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.

较暗的阴影是与NSTitledWindowMask绑定的行为,所以我不相信你可以使用NSBorderlessWindowMask实际获得这个。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM