aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/xwayland/XWayland.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xwayland/XWayland.cpp')
-rw-r--r--src/xwayland/XWayland.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/xwayland/XWayland.cpp b/src/xwayland/XWayland.cpp
index 8d45fa63..8cdb1fca 100644
--- a/src/xwayland/XWayland.cpp
+++ b/src/xwayland/XWayland.cpp
@@ -1,12 +1,17 @@
#include "XWayland.hpp"
#include "../debug/Log.hpp"
-CXWayland::CXWayland() {
+CXWayland::CXWayland(const bool enabled) {
#ifndef NO_XWAYLAND
Debug::log(LOG, "Starting up the XWayland server");
pServer = std::make_unique<CXWaylandServer>();
+ if (!enabled) {
+ unsetenv("DISPLAY");
+ return;
+ }
+
if (!pServer->create()) {
Debug::log(ERR, "XWayland failed to start: it will not work.");
return;
@@ -25,4 +30,4 @@ void CXWayland::setCursor(unsigned char* pixData, uint32_t stride, const Vector2
pWM->setCursor(pixData, stride, size, hotspot);
#endif
-} \ No newline at end of file
+}