/* Main SPDX-FileCopyrightText: 2015 David Edmundson SPDX-License-Identifier: LGPL-2.1-or-later */ #include #include "fdoselectionmanager.h" #include "util.h" #ifdef None #ifndef FIXX11H_None #define FIXX11H_None inline constexpr XID XNone = None; #undef None inline constexpr XID None = XNone; #endif #undef None #endif #include #include using Util = tray::Util; int main(int argc, char **argv) { // We will use the X connection managed by UTIL, we don't really care if the tool itself is // running with xcb or wayland QPA. // We'll use wayland QPA for testing on DDE, the following code uses dde-tray-loader's wayland // display, thus we can ensure our X events are not from QPA. qputenv("QT_QPA_PLATFORM", "wayland"); qputenv("WAYLAND_DISPLAY", "dockplugin"); qputenv("QT_WAYLAND_SHELL_INTEGRATION", "plugin-shell"); // qputenv("QT_QPA_PLATFORM", "xcb"); QGuiApplication::setDesktopSettingsAware(false); QCoreApplication::setAttribute(Qt::AA_DisableSessionManager); QGuiApplication app(argc, argv); if (!UTIL->isXAvaliable()) { qFatal("xembed-traymanager-proxy requires X11. Aborting"); } app.setQuitOnLastWindowClosed(false); FdoSelectionManager manager; auto rc = app.exec(); return rc; }