From 3c1eb48018d2742a91d2bc802021f97e27703a4b Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 20 Jun 2016 21:07:19 +0100 Subject: [PATCH] Don't include embedded contrainers in containmentAt(pos) Do to so means the System Tray applet ends up being placed inside the system tray container, which ends up in a parent loop, causing a stack overflow every time parent() is called recursively This happens whenever one drags a sys tray on the desktop or simply adds a new system tray whilst running. BUG: 361777 We also need to do a hack for Plasma/5.7 in plasma-desktop somehow in all cases where this is used. --- src/scriptengines/qml/plasmoid/containmentinterface.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp index db77db9ab..c390ad165 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -277,6 +277,9 @@ QObject *ContainmentInterface::containmentAt(int x, int y) if (contInterface && contInterface->isVisible()) { QWindow *w = contInterface->window(); if (w && w->geometry().contains(QPoint(window()->x(), window()->y()) + QPoint(x, y))) { + if (c->containmentType() == Plasma::Types::CustomEmbeddedContainment) { + continue; + } if (c->containmentType() == Plasma::Types::DesktopContainment) { desktop = contInterface; } else {