From 3e8b3656e78b14a9c9b2d985b32d19ac5b0c36ee Mon Sep 17 00:00:00 2001 From: Rosalie Wanders Date: Thu, 6 Feb 2025 17:03:10 +0100 Subject: [PATCH] RMG: RMG_WAYLAND -> RMG_ALLOW_WAYLAND --- Source/RMG/main.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Source/RMG/main.cpp b/Source/RMG/main.cpp index 3e6211e1..26cffdbd 100644 --- a/Source/RMG/main.cpp +++ b/Source/RMG/main.cpp @@ -67,16 +67,12 @@ int main(int argc, char **argv) // it works on KDE plasma and sway (on 2023-07-26), // but i.e doesn't work on GNOME wayland or labwc, // so to compromise the situation, we'll force xwayland - // unless RMG_WAYLAND is set to 1, which'll force wayland + // unless RMG_ALLOW_WAYLAND is set to 1, which'll allow wayland // as qt platform, so users can experiment with the // wayland support themselves - const char* wayland = std::getenv("RMG_WAYLAND"); - if (wayland != nullptr && - std::string(wayland) == "1") - { - setenv("QT_QPA_PLATFORM", "wayland", 1); - } - else + const char* allow_wayland = std::getenv("RMG_ALLOW_WAYLAND"); + if (allow_wayland == nullptr || + std::string(allow_wayland) != "1") { setenv("QT_QPA_PLATFORM", "xcb", 1); }