From 60aa5ff3730d77037ffad0c77ba96b99ef0c7df3 Mon Sep 17 00:00:00 2001 From: Bas Ruigrok Date: Mon, 30 Jun 2025 18:12:02 +0200 Subject: [PATCH] Inform Coin to use EGL when on Wayland (#21917) * Inform Coin to use EGL when on Wayland * Only check for Wayland on Linux and BSD --- src/Gui/Application.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 7b99d70022..41a1bf7993 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -2295,6 +2295,13 @@ void Application::runApplication() int argc = App::Application::GetARGC(); GUISingleApplication mainApp(argc, App::Application::GetARGV()); +#if defined(FC_OS_LINUX) || defined(FC_OS_BSD) + // If QT is running with native Wayland then inform Coin to use EGL + if (QGuiApplication::platformName() == QString::fromStdString("wayland")) { + setenv("COIN_EGL", "1", 1); + } +#endif + // Make sure that we use '.' as decimal point. See also // http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559846 // and issue #0002891