Really appreciate that you've opened source this solution. I'm using it in one of my upcoming Catalyst apps 😃
I ran into a small issue on macOS 12. It appears that the scene identifier differs between windowScene.session.persistentIdentifier
and the identifier included in the UISBHSDidCreateWindowForSceneNotification notification.
Here's an example between the two:
windowScene.session.persistentIdentifier
: 1013C9AC-9C0C-493C-AE24-0AE09303B465
UISBHSDidCreateWindowForSceneNotification
: FUScene|com.highcaffeinecontent.CatalystPrefsWindow(23541)|1013C9AC-9C0C-493C-AE24-0AE09303B465
Therefore the fullscreen options wouldn't be disabled for the preferences window.
The last part of the identifier is the same. I modified AppKitController so it only looks at the latter part of the scene identifier when comparing the scene identifier to the one provided from UIKit. It's not that pretty but it does the job.
Tested on macOS 12 beta 3.