File drag and drop regression on Windows 8

#1

Looks like there was a regression with file drag and drop support on Windows 8. It could be only HiDPI systems are affected. Reproduce: Try running JUCE’s WidgetDemo PIP and drag a file onto the green drop pad in the Drag & Drop tab. On my Windows 8.1 system the cursor never changes to indicate a drag will be accepted and dropping a file there won’t do anything. While dragging from the list view does work. All other systems don’t seem to be affected. Ie. macOS, Windows 10 (HiDPI and normal) do work as expected.
Last tried JUCE version that worked as expected is 5.3.1

0 Likes

#2

Thanks for reporting, this should be fixed in 72aee7f.

0 Likes

#3

I can’t confirm that this commit fixes the bug. I’ve just tried out and recompiled the WidgetsDemo from tip of develop branch and it still shows the crossed through icon here on my Windows 8.1 machine. It uses the JUCE_WIN_PER_MONITOR_DPI_AWARE path.

0 Likes

#4

OK, can you try just executing the non-JUCE_WIN_PER_MONITOR_DPI_AWARE path? ie. by replacing that method with:

Point<float> getMousePos (POINTL mousePos) const
{
    return peer.getComponent().getLocalPoint (nullptr,
                                              pointFromPOINT ({ mousePos.x, mousePos.y }).toFloat() / static_cast<float> (getGlobalDPI() / USER_DEFAULT_SCREEN_DPI));
}
0 Likes

#5

Yes. That does the trick!

0 Likes

#6

Ok, should be fixed here.

0 Likes

#7

Great! Thanks.

0 Likes