Skip to content

Commit 5b6db21

Browse files
committed
fix: not be able to undock xembed tray
判断写反了,导致移除失败... Log:
1 parent 67b9919 commit 5b6db21

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

plugins/application-tray/fdoselectionmanager.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ FdoSelectionManager::FdoSelectionManager(QObject *parent)
3535
: QObject(parent)
3636
, m_selectionOwner(new KSelectionOwner(UTIL->getAtomFromDisplay("_NET_SYSTEM_TRAY"), UTIL->getX11Connection(), UTIL->getRootWindow(), this))
3737
{
38-
qDebug(SELECTIONMGR) << "starting";
38+
qCDebug(SELECTIONMGR) << "starting";
3939

4040
// we may end up calling QCoreApplication::quit() in this method, at which point we need the event loop running
4141
QTimer::singleShot(0, this, &FdoSelectionManager::init);
@@ -175,10 +175,11 @@ void FdoSelectionManager::undock(xcb_window_t winId)
175175
Q_CHECK_PTR(m_trayManager);
176176
qCDebug(SELECTIONMGR) << "trying to undock window " << winId;
177177

178-
if (m_trayManager->haveIcon(winId)) {
178+
if (!m_trayManager->haveIcon(winId)) {
179+
qCDebug(SELECTIONMGR) << "failed to find winId to undock:" << winId;
179180
return;
180181
}
181-
182+
182183
// Unregister from TrayManager1 if available
183184
m_trayManager->unregisterIcon(winId);
184185

0 commit comments

Comments
 (0)