DocumentWindow::setResizable Q/Request

Is it possible to set up a DocumentWindow on OS X such that the “NSResizableWindowMask” flag is not set (hiding the green “kiosk mode” button), yet still allows grabbing in the corner and resizing the window that way?

Looking at void ResizableWindow::setResizable (const bool shouldBeResizable, const bool useBottomRightCornerResizer), all of the code related to the cornerResizer is controlled by shouldBeResizable.

this code is what causes the window styleflags to be updated.

if (isUsingNativeTitleBar())
        recreateDesktopWindow();

I didn’t see a way to block Kiosk mode from happening anywhere in the API, so that’s where this request is coming from.

I don’t have a concrete solution for you, but I found the following interesting SO answers:

interesting options there. Unfortunately, I haven’t figured out how to access the window from the Component::getPeer() method, as ComponentPeer::getNativeHandle() doesn’t like being cast to any NSView*/NSWindow*/ etc on my end no matter what I #include, even tho on OS X that method returns an NSView*

Are you patching JUCE or are you doing this cast in one of your own files? In the latter case, you have to make sure that the file is compiled as Objective-C++ by naming it with the .mm extension.

Feel free to share any compiler errors here as well.

doing the cast in my own files. I did not know that about the .mm.