简体   繁体   中英

How to make resize cursors show up for a floating non-activating panel?

I have a floating NSPanel that is non-activating, ie its styleMask contains the NSNonactivatingPanelMask flag. Since this panel never becomes active, the system does not show the usual resize cursors when getting close to one of the panel's edges.

Is there a way to get those resize cursors to show up for a non-activating panel? Eg the system's font panel pulls this off somehow.

The [NSFontPanel sharedFontPanel].styleMask == (NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask | NSUtilityWindowMask) . However, it shows resize indicators even if you add NSNonactivatingPanelMask .

When you set [NSFontPanel sharedFontPanel].hidesOnDeactivate = NO and activate another app, resize indicators stop working. This is by design, because even regular inactive windows cannot be resized.

So maybe you are trying to add resize indicators when the panel-owning app is inactive. Just a thought.

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