Skip to content

Commit eeaba89

Browse files
committed
feat: use signal-based xdgactivationclient API
- Update to use tokenReady signal with Qt::SingleShotConnection - Remove callback-based requestToken usage - Follow dde-shell xdgactivation pattern
1 parent f70f7f7 commit eeaba89

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

plugins/application-tray/sniprotocolhandler.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,13 @@ bool SniTrayProtocolHandler::eventFilter(QObject *watched, QEvent *event)
323323
auto widget = static_cast<QWidget*>(parent());
324324
auto *win = widget->window()->windowHandle();
325325
auto sniInter = m_sniInter;
326-
activationClient->requestToken(win, QString(), [sniInter](const QString &token) {
326+
connect(activationClient, &XdgActivationClient::tokenReady, this, [sniInter](const QString &token) {
327327
if (!token.isEmpty()) {
328328
sniInter->ProvideXdgActivationToken(token);
329329
}
330330
sniInter->Activate(0, 0);
331-
});
331+
}, Qt::SingleShotConnection);
332+
activationClient->requestToken(win);
332333
} else {
333334
m_sniInter->Activate(0, 0);
334335
}

0 commit comments

Comments
 (0)