1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-02-04 13:47:19 +03:00

systray,support context menus for SNI items

--SNI items are handling the context menu by their
own, so Latte code should not interfere

BUG:419263
FIXED-IN:0.9.11
This commit is contained in:
Michail Vourlakos 2020-03-26 14:40:00 +02:00
parent 0d29114664
commit ef2650e711

View File

@ -146,14 +146,22 @@ bool ContextMenu::mousePressEvent(QMouseEvent *event)
Plasma::Containment *internalC = m_latteView->layout()->internalContainmentOf(applet);
if (internalC) {
Plasma::Applet *internalApplet{nullptr};
for (const Plasma::Applet *appletCont : internalC->applets()) {
PlasmaQuick::AppletQuickItem *ai2 = appletCont->property("_plasma_graphicObject").value<PlasmaQuick::AppletQuickItem *>();
if (ai2 && ai2->isVisible() && ai2->contains(ai2->mapFromItem(m_latteView->contentItem(), event->pos()))) {
applet = ai2->applet();
internalApplet = ai2->applet();
break;
}
}
if (!internalApplet) {
return true;
} else {
applet = internalApplet;
}
}
break;