External Drag bug


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…


Bit more info… my invisible window has its setAlwaysOnTop() bit set…


I actually fixed that exact problem a couple of days ago! Sorry if I missed it out when writing the commit logs!


Serves me right! Oh well, good “practice” bug hunting I guess! (Like I need it!)


Just updated…tnx for the leak detector!

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…


And that’s a new behaviour within the last few days? I can’t think what I’ve done that would affect that…?


Wow, I hadn’t updated since June! (I was wondering why I had so many compile errors to fix!)

I’m not gonna sweat it too much, i’ll see if I can get better details for you later.