From a4dd1953c0f2ad9bdcb455279d3409d3ce68873b Mon Sep 17 00:00:00 2001 From: Ricardo <10128951+smplayer-dev@users.noreply.github.com> Date: Sun, 11 Jun 2023 16:25:08 +0200 Subject: [PATCH] Set QT_QPA_PLATFORM to xcb on startup --- src/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index a202d2793..3b1ea22d2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -58,6 +58,14 @@ QString hdpiConfig() { int main( int argc, char ** argv ) { +#ifdef Q_OS_LINUX + #if QT_VERSION >= 0x050600 + if (qgetenv("QT_QPA_PLATFORM").isEmpty()) { + qputenv("QT_QPA_PLATFORM", QByteArray("xcb")); + } + #endif +#endif + #ifdef HDPI_SUPPORT QString hdpi_config_path = hdpiConfig(); HDPISupport * hdpi = 0;