I’m trying to have my Windows + OSX plugin show a dialog modally wrt the host app, but am having a hard time doing so.
And before everyone jumps at my throat: yes, ‘modal is bad’, but my host (Premiere) just wants a modal dialog from it’s plugins. I basically have a “Show your dialog” C callback function the host calls, and when I return from it, the host requires the dialog to be closed again. It really just expects you to do a MessageBox etc., but I want something more fancy ofc. Therefore ‘modal is bad’ doesn’t apply here and modal(-like) really is the better/easier way to go.
Right now I am using DialogWindow::LaunchOptions, filling it in, calling it’s launchAsync(), followed by it’s runModalLoop(). This almost works, but since I don’t set the parent window, I can still alt-tab to the host again and I’m left with an unresponsive fullscreen host. Just clicking it makes my dialog show itself on top again, but it’s not ideal.
I do have the native window handle of the host app, but I don’t see a way to have my juce DialogWindow/TopLevelWindow use it. There is the addToDesktop() method, but I can’t seem to make it play nice with DialogWindow::LaunchOptions.launchAsync() nor DialogWindow.enterModalState().
All help appreciated!