refactor: simplify desktop::platform::isWayland

This commit is contained in:
sithlord48 2025-08-09 09:02:09 -04:00 committed by Chris Rizzitello
parent 9fe445ebd0
commit 7698980576

View file

@ -8,7 +8,6 @@
#pragma once #pragma once
#include <QFileInfo> #include <QFileInfo>
#include <string>
namespace deskflow::platform { namespace deskflow::platform {
@ -32,8 +31,7 @@ const auto kHasPortalInputCapture = false;
inline bool isWayland() inline bool isWayland()
{ {
const auto session = std::getenv("XDG_SESSION_TYPE"); return qEnvironmentVariable("XDG_SESSION_TYPE") == QStringLiteral("wayland");
return session != nullptr && std::string(session) == "wayland";
} }
/** /**