TooltipWindow's timer reset seems to have a cooldown, how do I disable it?

Hello everyone,

I set a juce::TooltipWindow up with a 2 seconds timer before the tooltips show, however while it works for the first tooltip, moving away too quickly towards another component shows the new tooltip immediately instead of waiting for 2 seconds as well. It also works if I move away and come back to the same component. If the mouse stays away from any component for a while the timer seems to reset and the next tooltip takes 2 seconds to show again.

here’s the current setup:

tooltipWindow.setMillisecondsBeforeTipAppears(2000);

freezeButton.setTooltip("Freezes the sidechain input.");
swapButton.setTooltip("Swaps the main and sidechain inputs.");

While I can see how useful it is when exiting and coming back to the same component to remove the need for waiting again, it becomes quite annoying when hovering other components after being done with a tooltip. Is there a way to disable this behaviour and reset the timer every time the cursor exits the component?


Alternatively, if it is not possible or would require a TooltipWindow per component or whatever messy trick, can I set it up to immediately display tooltips when a key is pressed? For instance holding Alt would make any tooltip appear immediately open being hovered by the mouse, otherwise none show up. That’s another way to deal with the problem that I would be interested to implement if I cannot disable the timer reset cooldown.