mirror of https://github.com/qt/qtbase.git
Fix QApplicationPrivate::pickMouseReceiver() crash
When a widget associate with a QWidgetWindow received a mouse event, but
another widget which is not a child of the widget has grabbed the mouse, the
application will crash. As QWidget::mapFrom() only works when mapping from
parent to child.
This is the side effect of SHA: f6c107d799
Task-number: QTBUG-25985
Change-Id: If2e6289e02d6d67c215694f2217221c9c7a0af46
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
This commit is contained in:
parent
4f27960dd8
commit
a86efb543d
|
@ -2447,7 +2447,7 @@ QWidget *QApplicationPrivate::pickMouseReceiver(QWidget *candidate, const QPoint
|
|||
|
||||
if (mouseGrabber && mouseGrabber != candidate) {
|
||||
receiver = mouseGrabber;
|
||||
*pos = receiver->mapFrom(candidate, windowPos);
|
||||
*pos = receiver->mapFromGlobal(candidate->mapToGlobal(windowPos));
|
||||
#ifdef ALIEN_DEBUG
|
||||
qDebug() << " ** receiver adjusted to:" << receiver << "pos:" << pos;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue