Question

I have a floating NSPanel that is non-activating, i.e. 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? E.g. the system's font panel pulls this off somehow.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top