no contextmenu for invisible applets

Change-Id: Ia94a467d860243f42bda756d9f94f4ad685446c7
This commit is contained in:
Marco Martin 2014-10-28 18:03:34 +01:00
parent d44d194db6
commit 5749b01fe3

View File

@ -719,7 +719,7 @@ void ContainmentInterface::mousePressEvent(QMouseEvent *event)
Plasma::Applet *applet = 0; Plasma::Applet *applet = 0;
foreach (QObject *appletObject, m_appletInterfaces) { foreach (QObject *appletObject, m_appletInterfaces) {
if (AppletInterface *ai = qobject_cast<AppletInterface *>(appletObject)) { if (AppletInterface *ai = qobject_cast<AppletInterface *>(appletObject)) {
if (ai->contains(ai->mapFromItem(this, event->posF()))) { if (ai->isVisible() && ai->contains(ai->mapFromItem(this, event->posF()))) {
applet = ai->applet(); applet = ai->applet();
emit ai->contextualActionsAboutToShow(); emit ai->contextualActionsAboutToShow();
break; break;