feat(system-tray): check have new tray protocol menu

Change-Id: Ic42da7521446b08ea7431cfbcaf35fdcbbd47032
This commit is contained in:
justforlxz 2018-10-25 15:49:38 +08:00
parent 6224d76f98
commit 11d97f206e
No known key found for this signature in database
GPG Key ID: 593AFD577C1B1A60
Notes: gerrit 2018-10-25 15:56:12 +08:00
Verified+1: <jenkins@deepin.com>
Code-Review+2: 流年匆忙 <justforlxz@gmail.com>
Submitted-by: 流年匆忙 <justforlxz@gmail.com>
Submitted-at: Thu, 25 Oct 2018 15:56:11 +0800
Reviewed-on: https://cr.deepin.io/39213
Project: dde/dde-dock
Branch: refs/heads/master

View File

@ -91,8 +91,12 @@ void SNITrayWidget::sendClick(uint8_t mouseButton, int x, int y)
break;
case XCB_BUTTON_INDEX_3:
// ContextMenu does not work
//m_sniInter->ContextMenu(x, y);
m_menu->popup(QPoint(x, y));
if (m_sniInter->menu().path().startsWith("/NO_DBUSMENU")) {
m_sniInter->ContextMenu(x, y);
}
else {
m_menu->popup(QPoint(x, y));
}
break;
default:
qDebug() << "unknown mouse button key";