It seems to be a focus issue.
The following hack in juce_win32_Windowing.cpp worked for me and seems not to have negative impact even
if you try to drag&drop something from outside the app. Tested with JuceDemo.
void doMouseMove (Point<int> position)
//This is to avoid triggering of drag&drop when
//dragging the mouse over a component from outside
if (! isFocused())
if (! isMouseOver)
isMouseOver = true;
ModifierKeys::getCurrentModifiersRealtime(); // (This avoids a rare stuck-button problem when focus is lost unexpectedly)
tme.cbSize = sizeof (tme);
tme.dwFlags = TME_LEAVE;
tme.hwndTrack = hwnd;
tme.dwHoverTime = 0;
if (! TrackMouseEvent (&tme))
else if (! isDragging)
if (! contains (position, false))
static uint32 lastMouseTime = 0;
static int minTimeBetweenMouses = getMinTimeBetweenMouseMoves();
const uint32 now = Time::getMillisecondCounter();
if (now >= lastMouseTime + minTimeBetweenMouses)
lastMouseTime = now;
Would this destroy other users code?