From fcd6752d4ffc865e25e95c536ad8f268dca911f8 Mon Sep 17 00:00:00 2001 From: reuk Date: Mon, 14 Mar 2022 19:07:11 +0000 Subject: [PATCH] VST2 Client: Fix popupmenu window location in VST2 plugins under the AudioPluginHost --- .../juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } }