1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Windows: Use MapWindowPoints() in HWNDComponentPeer::getBounds() to get correct client coordinates when we're the child of another HWND

This commit is contained in:
ed 2021-02-11 09:30:48 +00:00
parent d8542481fd
commit b5a06b0e2f

View file

@ -1416,8 +1416,8 @@ public:
if (auto parentH = GetParent (hwnd))
{
auto r = getWindowRect (parentH);
auto localBounds = rectangleFromRECT (bounds).translated (-r.left, -r.top);
MapWindowPoints (HWND_DESKTOP, parentH, (LPPOINT) &bounds, 2);
auto localBounds = rectangleFromRECT (bounds);
#if JUCE_WIN_PER_MONITOR_DPI_AWARE
if (isPerMonitorDPIAwareWindow (hwnd))