Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions plugins/application-tray/xembedprotocolhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
// SPDX-License-Identifier: GPL-3.0-or-later

#include "abstracttrayprotocol.h"
#include "traymanager1interface.h"

Check warning on line 6 in plugins/application-tray/xembedprotocolhandler.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "traymanager1interface.h" not found.
#include "xembedprotocolhandler.h"

#if _DDE_TRAY_LOADER_HANDLE_XEMBED_SELECTION_MANAGER
#include "fdoselectionmanager.h"
#endif // _DDE_TRAY_LOADER_HANDLE_XEMBED_SELECTION_MANAGER

#include "util.h"
#include "plugin.h"

Check warning on line 14 in plugins/application-tray/xembedprotocolhandler.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "plugin.h" not found.

#include <QBitmap>
#include <QWindow>
Expand Down Expand Up @@ -41,10 +44,12 @@

QMetaObject::invokeMethod(this, &XembedProtocol::onTrayIconsChanged, Qt::QueuedConnection);

#if _DDE_TRAY_LOADER_HANDLE_XEMBED_SELECTION_MANAGER
if ((qgetenv("XDG_SESSION_TYPE") == "wayland") && UTIL->isXAvaliable()) {
qWarning() << "Not running on X11, registering FDO selection manager";
m_selectionManager = new FdoSelectionManager(this);
}
#endif // _DDE_TRAY_LOADER_HANDLE_XEMBED_SELECTION_MANAGER

QTimer::singleShot(0, this, [this](){
m_trayManager->Manage();
Expand Down
8 changes: 7 additions & 1 deletion plugins/application-tray/xembedprotocolhandler.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand All @@ -13,9 +13,15 @@
#include <qpoint.h>
#include <qtimer.h>
#include <xcb/xproto.h>
#include <xcb/composite.h>

Check warning on line 16 in plugins/application-tray/xembedprotocolhandler.h

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <xcb/composite.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <xcb/xcb_image.h>

Check warning on line 17 in plugins/application-tray/xembedprotocolhandler.h

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <xcb/xcb_image.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.

// dde-daemon handles tray selection-manager registeration so we don't (and shouldn't) need this.
// Also, if we need to register the FDO selection manager, we also need to ensure tray context menu
// position can be handled correctly. The whole FdoSelectionManager stuff might be worth to move to
// dde-shell instead.
#define _DDE_TRAY_LOADER_HANDLE_XEMBED_SELECTION_MANAGER 0

class FdoSelectionManager;
namespace tray {
class XembedProtocol : public AbstractTrayProtocol, public QAbstractNativeEventFilter
Expand Down
Loading