Tooltips get stuck

When two controls with tooltips are next to each other, moving the mouse to the next one doesn’t change the tooltip. This also happens when the mouse is moved rapidly between two controls, so little time was spent over an area with no tooltips.

Example:

struct MyAudioProcessorEditor : juce::AudioProcessorEditor
{
    juce::TextButton btnL{ "<" }, btnR{ ">" };
    juce::TooltipWindow ttWindow;

    MyAudioProcessorEditor (MyAudioProcessor& p) : AudioProcessorEditor{ p }, ttWindow{ this }
    {
        btnL.setTooltip ("left button");
        btnR.setTooltip ("right button");
        addAndMakeVisible (btnL);
        addAndMakeVisible (btnR);
        setSize (400, 400);
    }

    void resized() override
    {
        auto bounds{ getLocalBounds() };
        btnL.setBounds (bounds.removeFromLeft (getWidth() / 2));
        btnR.setBounds (bounds);
    }

    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MyAudioProcessorEditor)
};

Thanks for reporting. I’ve pushed a fix to develop here:

2 Likes