Possible drag & drop bug with differently scaled displays

I have a major problem in JUCE 8.0.3 with drag & drop between two separate monitors which have a different dpi scaling under Windows 10 (Monitor 1: 100%, Monitor 2: 175%). It is almost impossible to use drag & drop between two differently scaled monitors, because during drag & drop the mouse cursor separates from the dragged component as soon as it enters the other display. This can also easily be reproduced with the JUCE DemoRunner under WidgetsDemo - Drag & Drop: Just drag an item onto another monitor with different scaling and you will notice the problem immediately.

This problem occurs only in Windows (macOS is OK) and is a new behavior in JUCE 8. In JUCE 6 this problem does NOT exist.

For my customers (who often use differently scaled monitors under Windows) this basically makes the application non-functional.

Is there any idea, how to solve this problem? And could the JUCE team please have a look into this?

Thank you very much!

Thanks for reporting. The initial issue was indeed a regression introduced in JUCE 8. That should be fixed here:

Even on commits prior to the regression, I observed that the dragged image could “detach” from the mouse in the case where the component’s top-left was on a different display than the mouse cursor. This issue should be fixed here:

Hopefully, with both commits in place, dragged components should follow the mouse closely, even when moving between displays. Please try out the change and let us know if you encounter any further issues.

I have just tried out your fixes and can confirm that everything is now working perfectly well.
Thank you very much!

1 Like