ThreadWithProgressWindow and keyboard focus

Hi Jules,

 

I'm using a ThreadWithProgressWindow in my application.

This one grabs the keyboard focus by default by using enterModalState without any argument.

In standalone, the focus is given back to the main window when the ThreadWithProgressWindow is closed but in plugin, the focus it not given back (happen on both OSX and Windows)

 

Any idea what it could be related to ? 

 

Thanks !

FWIW, changing enterModalState to use false regarding keyboard grabing do not fixes the issue.

 

I have not seen this problem. I use a ThreadWIthProgessWindow with keyboard events but my main plugin window has jucePluginRequiresKeyboardFocus = false. 

As you have probably experienced, these things can be different for each host. What hosts are you having this problem with?

 

 

The problem is not that ThreadWIthProgessWindow do not receive keyboard, it's just that it doesn't give it back to the main window after it is done.

 

I just tried with Live 9 64bits where it never works and in VSTHost sometimes it works sometimes it doesn't.

 

Strange.

Following this, could there be an addition to allow AlertWindow and ThreadWithProgressWindow to not be on the Desktop ?

This would avoid the issue.

 

Thanks !

Good request, though I'm sure that you could already do that, at least with AlertWindow, if you manually added it to a parent - it's only a Component after all.

Well in the ctor of AlertWindow, it create a TopLevelWindow and always gives true to the second "add to desktop" parameter

so you would need to add this flag to AlertWindow ctor

Ok, fair point.