Hot Door CORE Forum

Full Version: Widget structure and MacOS Big Sur
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Sergiy

Hello.
I am using CustomWidget and I was wondering if you could help me understand different behaviour on Big Sur compared to older macOS versions.
I am using CustomWidget to get platform widget and in the end get a window reference for rendering like this

    NSView* pNSView = widget.platformWidget();
    NSWindow* pNSWindow = [pNSView window];
    WindowRef myWindowRef = (WindowRef)[pNSWindow windowRef];


Later it would be used in aglSetWindowRef function.

Normally this would result in a correct myWindowRef that I can later use. However on Big Sur myWindowRef  is always 0 for some reason.
Could you help me understand why it behaves like this? Is there some difference in how widgets or windows work? Thank you.
We haven't used such functionality in any plugins on Big Sur, so can't comment on why you're experiencing that issue - especially given that, at the end you're calling a pure-OS method (NSWindow's windowRef).

My guess would be that something changed, or Big Sur simply has a bug, regarding Cocoa-Carbon integrations. The WindowRef type is from Carbon, which has slowly been getting deprecated and removed by Apple over the years.