Yes, I’ve removed the hitTest code and it works as it should. But now I get hover mouseHovers when the mouse is over the scrollbar:
Here is my hitTest code:
bool GUI_Listbox::hitTest (int x, int y)
if (getViewport ()->getVerticalScrollBar ()->isVisible ())
const int scrW = getViewport ()->getScrollBarThickness ();
const int margin = scrW + getOutlineThickness () * 2;
if (x >= (getWidth () - margin) && x < (getWidth () - (margin - scrW)))
return ListBox::hitTest (x, y);
As you can see, there is nothing nefarious going on.
No, no components are deleted or being added or anything like that. It’s simply two ListBoxes side by side, both with lots of entries in them (hence the scrollbar turning on) and when I move the mouse quickly between the left and right control (from the left to the right), there is a very good chance (>10%) that “mouseExit” doesn’t get called for the left control.
If I only leave the “return ListBox:hitTest (x, y);” in there and comment the rest out, I can’t reproduce the problem at all.