Hot Door CORE Forum
Widget structure and MacOS Big Sur - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: Bugs (http://hotdoorcore.com/forum/forumdisplay.php?fid=5)
+--- Thread: Widget structure and MacOS Big Sur (/showthread.php?tid=265)



Widget structure and MacOS Big Sur - Sergiy - 01-12-2021

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.


RE: Widget structure and MacOS Big Sur - garrett - 01-18-2021

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.