diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-08-05 14:11:09 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-08-06 14:03:01 +0200 |
commit | fc16dcce9df51d4d65065f8f9a8b9525856cb5ae (patch) | |
tree | fdb602714f9e3c6a445d4296ae20ca86dd6b8207 /src | |
parent | 07bbc4da320c7f4710af0139516b9c8bafe33c52 (diff) |
Restrict tooltips triggered by mouse move events to widget area.
Tooltips may occur outside the widget area when it has mouse grab.
Task-number: QTBUG-40261
Change-Id: I68c1e28ad264fc5aaeb7d96273342f1d4bca8ce6
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 2b90971398..4818dd7eaa 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -3246,7 +3246,8 @@ bool QApplication::notify(QObject *receiver, QEvent *e) // feature without choice of opting-in or out, you ALWAYS have to have // tracking enabled. Therefore, the other properties give a false sense of // performance enhancement. - if (e->type() == QEvent::MouseMove && mouse->buttons() == 0) { + if (e->type() == QEvent::MouseMove && mouse->buttons() == 0 + && w->rect().contains(relpos)) { // Outside due to mouse grab? d->toolTipWidget = w; d->toolTipPos = relpos; d->toolTipGlobalPos = mouse->globalPos(); |