From fe744f81129b88f006c024c39d43eb0f29892110 Mon Sep 17 00:00:00 2001 From: reuk Date: Mon, 14 Mar 2022 21:27:03 +0000 Subject: [PATCH] VST2 Client: Flush command buffer after attaching plugin window on Linux --- modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index d0842eb5c2..8fc46bfc0b 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -1071,6 +1071,10 @@ public: (Window) getWindowHandle(), (HostWindowType) hostWindow, 0, 0); + // The host is likely to attempt to move/resize the window directly after this call, + // and we need to ensure that the X server knows that our window has been attached + // before that happens. + X11Symbols::getInstance()->xFlush (display); #elif JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE checkHostWindowScaleFactor(); startTimer (500);