diff --git a/src/core/utilities.cpp b/src/core/utilities.cpp index 7ed5a6052..c67145ee0 100644 --- a/src/core/utilities.cpp +++ b/src/core/utilities.cpp @@ -354,7 +354,6 @@ void ForwardMouseEvent(const QMouseEvent* e, QWidget* target) { QMouseEvent c(e->type(), target->mapFromGlobal(e->globalPos()), e->globalPos(), e->button(), e->buttons(), e->modifiers()); - target->setAttribute(Qt::WA_UnderMouse, true); QApplication::sendEvent(target, &c); } diff --git a/src/globalsearch/globalsearchtooltip.cpp b/src/globalsearch/globalsearchtooltip.cpp index b02ff0510..722557f0a 100644 --- a/src/globalsearch/globalsearchtooltip.cpp +++ b/src/globalsearch/globalsearchtooltip.cpp @@ -159,6 +159,9 @@ bool GlobalSearchTooltip::event(QEvent* e) { QWidget* child = event_target_->childAt( event_target_->mapFromGlobal(me->globalPos())); + if (child) + child->setAttribute(Qt::WA_UnderMouse, true); + Utilities::ForwardMouseEvent(me, child ? child : event_target_); return true; }