diff --git a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp index e1d2f294e8..165ca28c6e 100644 --- a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp +++ b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp @@ -1864,7 +1864,9 @@ Rectangle XWindowSystem::getWindowBounds (::Window windowH, ::Window parent } else { - parentScreenPosition = Point (rootX, rootY); + // XGetGeometry returns wx and wy relative to the parent window's origin. + // XTranslateCoordinates returns rootX and rootY relative to the root window. + parentScreenPosition = Point (rootX - wx, rootY - wy); } }