1
0
Fork 0
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:
jules 2012-09-06 11:03:17 +01:00
parent 001ce3ee61
commit 6e631bceb1

View file

@ -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;
};
//==============================================================================