Ok, let’s see if I can explain this! I am a few commits behind in GIT, but I checked the logs and couldn’t see anything referencing this…
I had been tracking down a weird bug where I have a TableListBox, and occasionally when I dragged some rows it was calling my “shouldDropFilesWhenDraggedExternally” method when my mouse was clearly still over my component!
After some debugging, turns out…
Component* Desktop::findComponentAt was finding an invisible window in that area but then c->getComponentAt was returning 0 because it was invisible, which then triggers the if (Desktop::getInstance().findComponentAt (screenPos) == 0) condition to be true in DragImageComponent::updateLocation before it iterated over my main window…
I don’t know whether the component that desktopComponents.getUnchecked(i) returns should be checked for visibility as well, or whether that’ll have some adverse reaction…
But now… my autoScroll on a viewport looks like it is on 10 cups of coffee… I turned off beginDragAutoRepeat(), so all I have is
autoScroll (x, y, 20, 10);
Seems like the viewport then sets the top left position, and then component.cpp sends a fakemouse and before you know it, i’m caught in a little loop, where autoscroll is called again and again but I haven’t even moved the mouse a pixel…