Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/EnvUtils.cpp5
-rw-r--r--src/EnvUtils.h2
2 files changed, 7 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
diff --git a/src/EnvUtils.h b/src/EnvUtils.h
index 1cd454963..7a245f527 100644
--- a/src/EnvUtils.h
+++ b/src/EnvUtils.h
@@ -22,6 +22,8 @@ QString getenv(QString name);
bool setenv(QString name, QString value);
+bool waylandIsUsed();
+
}; // namespace EnvUtils
#endif