Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top