use deferred deletion for the mouse grabber, otherwise we might run into
crashes in QQuickWindow, when deleting is the result of a mouse release somewhere below the popup
This commit is contained in:
parent
9845aa2966
commit
bc7562234d
@ -251,8 +251,19 @@ void QskPopup::updateInputGrabber()
|
||||
}
|
||||
else
|
||||
{
|
||||
delete m_data->inputGrabber;
|
||||
m_data->inputGrabber = nullptr;
|
||||
if ( m_data->inputGrabber )
|
||||
{
|
||||
/*
|
||||
In QQuickWindowPrivate::deliverPressOrReleaseEvent ( 5.12 )
|
||||
might crash, when we delete the grabber as a result of a
|
||||
mouse event somewehere below the popup.
|
||||
*/
|
||||
m_data->inputGrabber->setParentItem( nullptr );
|
||||
m_data->inputGrabber->setParent( nullptr );
|
||||
m_data->inputGrabber->deleteLater();
|
||||
|
||||
m_data->inputGrabber = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user