mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Windows: Fixed file drag and drop for Windows 8
This commit is contained in:
parent
38da38f658
commit
090aef2d70
1 changed files with 6 additions and 3 deletions
|
|
@ -1732,10 +1732,13 @@ public:
|
|||
Point<float> screenPos;
|
||||
|
||||
#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
|
||||
screenPos = pointFromPOINT ({ mousePos.x, mousePos.y }).toFloat() / static_cast<float> (getGlobalDPI() / USER_DEFAULT_SCREEN_DPI);
|
||||
|
||||
return peer.getComponent().getLocalPoint (nullptr, screenPos);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue