Browse Source

Windows: Fixed file drag and drop for Windows 8

tags/2021-05-28
ed 6 years ago
parent
commit
090aef2d70
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp

+ 6
- 3
modules/juce_gui_basics/native/juce_win32_Windowing.cpp View File

@@ -1732,10 +1732,13 @@ public:
Point<float> screenPos; Point<float> screenPos;
#if JUCE_WIN_PER_MONITOR_DPI_AWARE #if JUCE_WIN_PER_MONITOR_DPI_AWARE
screenPos = convertPhysicalScreenPointToLogical (pointFromPOINT ({ mousePos.x, mousePos.y }), (HWND) peer.getNativeHandle()).toFloat();
#else
screenPos = pointFromPOINT ({ mousePos.x, mousePos.y }).toFloat() / static_cast<float> (getGlobalDPI() / USER_DEFAULT_SCREEN_DPI);
auto h = (HWND) peer.getNativeHandle();
if (isPerMonitorDPIAwareWindow (h))
screenPos = convertPhysicalScreenPointToLogical (pointFromPOINT ({ mousePos.x, mousePos.y }), h).toFloat();
else
#endif #endif
screenPos = pointFromPOINT ({ mousePos.x, mousePos.y }).toFloat() / static_cast<float> (getGlobalDPI() / USER_DEFAULT_SCREEN_DPI);
return peer.getComponent().getLocalPoint (nullptr, screenPos); return peer.getComponent().getLocalPoint (nullptr, screenPos);
} }


Loading…
Cancel
Save