Make clicking outside the global search tooltip work again

This commit is contained in:
David Sansome 2011-10-15 21:57:08 +01:00
parent 4cabb98b43
commit da825d4659
2 changed files with 3 additions and 1 deletions

View File

@ -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);
}

View File

@ -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;
}