From f7e5b43f1e2d8a4194f349c59213f36e387d8f83 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 5 Oct 2024 20:02:20 +0200 Subject: [PATCH] Fix showing webgui for linux standalones Signed-off-by: falkTX --- distrho/src/DistrhoUI.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/distrho/src/DistrhoUI.cpp b/distrho/src/DistrhoUI.cpp index ca8894dc..252636fb 100644 --- a/distrho/src/DistrhoUI.cpp +++ b/distrho/src/DistrhoUI.cpp @@ -217,7 +217,12 @@ PluginWindow& UI::PrivateData::createNextWindow(UI* const ui, uint width, uint h ; opts.callback = webViewMessageCallback; opts.callbackPtr = uiData; - uiData->webview = webViewCreate("file://" + path + "/index.html", uiData->winId, width, height, scaleFactor, opts); + uiData->webview = webViewCreate("file://" + path + "/index.html", + uiData->winId ? uiData->winId : uiData->window->getNativeWindowHandle(), + width, + height, + scaleFactor, + opts); #endif } // If there are no callbacks, this is most likely a temporary window, so ignore idle callbacks