diff --git a/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp b/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp index 08b238b100..3d013c3eb3 100644 --- a/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp +++ b/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp @@ -39,7 +39,7 @@ BubbleComponent::~BubbleComponent() //============================================================================== void BubbleComponent::paint (Graphics& g) { - getLookAndFeel().drawBubble (g, arrowTip.x, arrowTip.y, + getLookAndFeel().drawBubble (g, (float) arrowTip.x, (float) arrowTip.y, (float) content.getX(), (float) content.getY(), (float) content.getWidth(), (float) content.getHeight()); @@ -109,7 +109,7 @@ void BubbleComponent::setPosition (const Rectangle& rectangleToPointTo) if (jmax (spaceAbove, spaceBelow) >= jmax (spaceLeft, spaceRight)) { targetX = rectangleToPointTo.getCentre().x; - arrowTip.x = totalW * 0.5f; + arrowTip.x = totalW / 2; if (spaceAbove >= spaceBelow) { @@ -127,7 +127,7 @@ void BubbleComponent::setPosition (const Rectangle& rectangleToPointTo) else { targetY = rectangleToPointTo.getCentre().y; - arrowTip.y = totalH * 0.5f; + arrowTip.y = totalH / 2; if (spaceLeft > spaceRight) { diff --git a/modules/juce_gui_basics/misc/juce_BubbleComponent.h b/modules/juce_gui_basics/misc/juce_BubbleComponent.h index 8fc82624b4..7acfa940e5 100644 --- a/modules/juce_gui_basics/misc/juce_BubbleComponent.h +++ b/modules/juce_gui_basics/misc/juce_BubbleComponent.h @@ -144,7 +144,7 @@ public: private: Rectangle content; - Point arrowTip; + Point arrowTip; int allowablePlacements; DropShadowEffect shadow; diff --git a/modules/juce_gui_basics/native/juce_mac_FileChooser.mm b/modules/juce_gui_basics/native/juce_mac_FileChooser.mm index f413e867b9..2d362e0388 100644 --- a/modules/juce_gui_basics/native/juce_mac_FileChooser.mm +++ b/modules/juce_gui_basics/native/juce_mac_FileChooser.mm @@ -119,6 +119,9 @@ public: action: nil keyEquivalent: nsEmptyString()]; [[NSApp mainMenu] setSubmenu: menu forItem: item]; [menu release]; + + // use a dummy modal component so that apps can tell that something is currently modal. + dummyModalComponent.enterModalState(); } ~TemporaryMainMenuWithStandardCommands() @@ -129,6 +132,7 @@ public: private: MenuBarModel* oldMenu; ScopedPointer oldAppleMenu; + Component dummyModalComponent; }; //==============================================================================