Tootips blinking bug?


#1

The tooltips continously blinks in a Windows VST plugin only when the host is running. I suspect the fail is in the MouseInputSource::getComponentUnderMouse().

I'm currently using the lastest stable release from Juce (3.20). Could it be fixed?


#2

Any particular host? I'd expect it to be host-dependent.


#3

I tested it with FL Studio 11, FL Studio 12, and Reaper 4 (all of them at 32 bits). I didn't have this problem using Juce 3.11, if I recall correctly, and I didn't changed any code related with this function in the last year [MouseInputSource::getComponentUnderMouse()].


#4

Do you have a code snippet we could use to reproduce + test this?


#5

Of course. I stripped down the code, and the bug seems related to the new LookAndFeel::getTooltipBounds(). I do not understand which relationship it has. Try to compile this AudioProcessorEditor, run it, and click in the window to see the blinking Popup. Also I leave you a video showing it: https://youtu.be/MJ2HyxI4AxM

 

If I can help with anything, let me know.

 

/*
  ==============================================================================

    This file was auto-generated by the Introjucer!

    It contains the basic startup code for a Juce application.

  ==============================================================================
*/

#ifndef __PLUGINEDITOR_H_F6A54320__
#define __PLUGINEDITOR_H_F6A54320__

#include "../JuceLibraryCode/JuceHeader.h"
#include "PluginProcessor.h"


//==============================================================================
/**
*/
class TrackPadMacAudioProcessorEditor  : public AudioProcessorEditor,
   public SettableTooltipClient
{
public:
    TrackPadMacAudioProcessorEditor (TrackPadMacAudioProcessor* ownerFilter):
      AudioProcessorEditor (ownerFilter)
   {
      setSize (400, 300);

      m_lookTest = new CustomLook();

      m_tooltipWindow = new TooltipWindow();
      m_tooltipWindow->setLookAndFeel(m_lookTest);

      setTooltip("test");

   }
    ~TrackPadMacAudioProcessorEditor()
    {
       m_tooltipWindow = 0;
    }

    //==============================================================================
    // This is just a standard Juce paint method...
    void paint (Graphics& g) {g.fillAll(Colours::white);}


    class CustomLook: public LookAndFeel_V2
    {
    public:
       CustomLook() {}
       ~CustomLook() {}

       virtual Rectangle<int32> getTooltipBounds(const String& /*tipText*/, Point<int> screenPos, Rectangle<int> /*parentArea*/)
       {
          return Rectangle<int32>(screenPos.x, screenPos.y, 70, 20);
       }
    };

    ScopedPointer<TooltipWindow> m_tooltipWindow;
    ScopedPointer<CustomLook> m_lookTest;
};


#endif  // __PLUGINEDITOR_H_F6A54320__

 


#6

Before I actually spend time trying this, do you not get the problem without your custom look+feel?

I mention this because tooltips hide themselves when the cursor enters them. So if you position the window so that when it appears, it already contains the cursor, then that would explain what you're seeing..


#7

Indeed. That was the mistake. Thank you for your support :)