Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
Wayland.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2024 Symless Ltd.
4 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
5 */
6
7#pragma once
8
9#include <string>
10
11namespace deskflow::platform {
12
13#if WINAPI_LIBEI
14const auto kHasEi = true;
15#else
16const auto kHasEi = false;
17#endif
18
19#if WINAPI_LIBPORTAL
20const auto kHasPortal = true;
21#else
22const auto kHasPortal = false;
23#endif
24
25#if HAVE_LIBPORTAL_INPUTCAPTURE
26const auto kHasPortalInputCapture = true;
27#else
28const auto kHasPortalInputCapture = false;
29#endif
30
31inline bool isWayland()
32{
33 const auto session = std::getenv("XDG_SESSION_TYPE");
34 return session != nullptr && std::string(session) == "wayland";
35}
36
37} // namespace deskflow::platform
Definition MSWindowsProcess.cpp:23
const auto kHasEi
Definition Wayland.h:16
const auto kHasPortalInputCapture
Definition Wayland.h:28
bool isWayland()
Definition Wayland.h:31
const auto kHasPortal
Definition Wayland.h:22