diff options
Diffstat (limited to 'src/EnvUtils.cpp')
-rw-r--r-- | src/EnvUtils.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/EnvUtils.cpp b/src/EnvUtils.cpp index 7dce1095d..1c3a6dd63 100644 --- a/src/EnvUtils.cpp +++ b/src/EnvUtils.cpp @@ -56,4 +56,9 @@ bool setenv(QString name, QString value) { #endif } +bool waylandIsUsed() { + // If wayland is used, this environment variable is expected to be set + return getenv(QStringLiteral("WAYLAND_DISPLAY")) != ""; +} + }; // namespace EnvUtils |