mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
FileChooser: Fix bug where native FileChooser could not be closed when hosted in Cantabile
Previously, the top-level modal dismiss broadcaster would attempt to dismiss all modals when the native file chooser was brought to the front or clicked. This would end up calling Component::inputAttemptWhenModal, which would bring the FileChooser's Component to the front, interrupting the mouse click. The fix is to avoid bringing the plugin window to the front when the FileChooser is in a modal state. As the chooser is a native window, the system should take care of enforcing the expected modal behaviour. It's not clear why this issue only affects Cantabile. It seems that in Cantabile, events from the native FileChooser get sent to the plugin editor's parent HWND, whereas this doesn't happen in other hosts. Perhaps Cantabile is hooking/intercepting window messages in some way.
This commit is contained in:
parent
910c60b84a
commit
4ba81fda59
1 changed files with 2 additions and 0 deletions
|
|
@ -876,6 +876,8 @@ public:
|
|||
return targetComponent->findParentComponentOfClass<FilePreviewComponent>() != nullptr;
|
||||
}
|
||||
|
||||
void inputAttemptWhenModal() override {}
|
||||
|
||||
private:
|
||||
FileChooser& owner;
|
||||
std::shared_ptr<Win32NativeFileChooser> nativeFileChooser;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue