Ignore "Keep plugin windows on top" setting when on wayland (#7901)

Fix a crash that occurs when running under Wayland and when loading a VST
plugin with the option "Keep plugin windows on top when not embedded"
enabled.
This commit is contained in:
Andrew Wiltshire
2025-05-31 18:58:08 +01:00
committed by GitHub
parent 352ef8c25e
commit 3f8b86a559
3 changed files with 9 additions and 4 deletions

View File

@@ -55,6 +55,7 @@ public:
static GuiApplication* instance();
static void sigintHandler(int);
static bool isWayland();
#ifdef LMMS_BUILD_WIN32
static QFont getWin32SystemFont();
#endif

View File

@@ -49,12 +49,12 @@
#include "AudioEngine.h"
#include "ConfigManager.h"
#include "FileDialog.h"
#include "GuiApplication.h"
#include "LocaleHelper.h"
#include "MainWindow.h"
#include "PathUtil.h"
#include "Song.h"
#include "FileDialog.h"
#ifdef LMMS_BUILD_LINUX
# include <X11/Xlib.h>
@@ -404,9 +404,8 @@ bool VstPlugin::processMessage( const message & _m )
{
case IdVstPluginWindowID:
m_pluginWindowID = _m.getInt();
if( m_embedMethod == "none"
&& ConfigManager::inst()->value(
"ui", "vstalwaysontop" ).toInt() )
if (m_embedMethod == "none" && !gui::GuiApplication::isWayland()
&& ConfigManager::inst()->value("ui", "vstalwaysontop").toInt())
{
#ifdef LMMS_BUILD_WIN32
// We're changing the owner, not the parent,

View File

@@ -79,6 +79,11 @@ GuiApplication* GuiApplication::instance()
return s_instance;
}
bool GuiApplication::isWayland()
{
return QGuiApplication::platformName().contains("wayland");
}
GuiApplication::GuiApplication()