macOS: Close popups on mouse down using synchronous QPA delivery

Change-Id: I5ccb5ca4f9b9f7a480c575c5a2710ec20361cf88
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-06-15 23:22:35 +02:00
parent cbd2973a19
commit f529f94132

View File

@ -398,8 +398,7 @@
Qt::WindowType type = QCocoaIntegration::instance()->activePopupWindow()->window()->type();
while (QCocoaWindow *popup = QCocoaIntegration::instance()->popPopupWindow()) {
selfClosed = self == popup->view();
QWindowSystemInterface::handleCloseEvent(popup->window());
QWindowSystemInterface::flushWindowSystemEvents();
QWindowSystemInterface::handleCloseEvent<QWindowSystemInterface::SynchronousDelivery>(popup->window());
if (!m_platformWindow)
return; // Bail out if window was destroyed
}