mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-06 04:00:08 +00:00
OSX filechooser modality fix.
This commit is contained in:
parent
001ce3ee61
commit
6e631bceb1
1 changed files with 16 additions and 1 deletions
|
|
@ -132,7 +132,22 @@ public:
|
|||
private:
|
||||
MenuBarModel* oldMenu;
|
||||
ScopedPointer<PopupMenu> oldAppleMenu;
|
||||
Component dummyModalComponent;
|
||||
|
||||
// The OS view already plays an alert when clicking outside
|
||||
// the modal comp, so this override avoids adding extra
|
||||
// inappropriate noises when the cancel button is pressed.
|
||||
class SilentDummyModalComp : public Component
|
||||
{
|
||||
public:
|
||||
SilentDummyModalComp() {}
|
||||
|
||||
void inputAttemptWhenModal()
|
||||
{
|
||||
ModalComponentManager::getInstance()->bringModalComponentsToFront();
|
||||
}
|
||||
};
|
||||
|
||||
SilentDummyModalComp dummyModalComponent;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue