From 45f50723d9c45387e0b227cab6414ba0ed7262ec 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..3ec352b3 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 != 0 ? 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