steinbergmedia / vstgui

A user interface toolkit mainly for audio plug-ins
Other
880 stars 124 forks source link

CNewFileSelector blocks all UI interaction on linux (including other applications) #332

Open Distb opened 1 month ago

Distb commented 1 month ago

VST SDK 3.7 VSTGUI 4.14 Linux Mint 21.3 xfce

My VST plugin wants to show a file open dialog in response to the user clicking a button. In my editor's IControlListener::valueChanged() method, I am detecting button release and doing something like this:

VSTGUI::CNewFileSelector * selector = VSTGUI::CNewFileSelector::create( getFrame(), VSTGUI::CNewFileSelector::kSelectFile );
if( selector )
{
    selector->setDefaultExtension( VSTGUI::CFileExtension( "txt", "txt" ) );
    selector->setTitle( "Select an Instrument File" );
    selector->runModal();
}

When the button is clicked on linux (in editorhost or ardour), a file open dialog is displayed, but this locks up the entire UI -- the cursor moves in response to the mouse, but clicks don't appear to be delivered to any applications. I have to use Ctrl+Alt+Fn to change to a text terminal and kill the host application if I want any applications to be usable again.

Using selector->run( CalbackFunc && ) behaves the same.