refactor: simplify desktop::platform::isWayland
This commit is contained in:
parent
9fe445ebd0
commit
7698980576
1 changed files with 1 additions and 3 deletions
|
|
@ -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";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue