refactor: simplify desktop::platform::isWayland
This commit is contained in:
committed by
Chris Rizzitello
parent
9fe445ebd0
commit
7698980576
@ -8,7 +8,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <string>
|
||||
|
||||
namespace deskflow::platform {
|
||||
|
||||
@ -32,8 +31,7 @@ const auto kHasPortalInputCapture = false;
|
||||
|
||||
inline bool isWayland()
|
||||
{
|
||||
const auto session = std::getenv("XDG_SESSION_TYPE");
|
||||
return session != nullptr && std::string(session) == "wayland";
|
||||
return qEnvironmentVariable("XDG_SESSION_TYPE") == QStringLiteral("wayland");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user