}
}
if (platformWindow) {
+ // Suppress events sent during DestroyWindow() for native children.
+ if (platformWindow->testFlag(QWindowsWindow::WithinDestroy))
+ return false;
if (QWindowsContext::verboseEvents > 1)
qDebug().nospace() << "Event window: " << platformWindow->window();
} else {
if (QWindowsContext::verboseIntegration || QWindowsContext::verboseWindows)
qDebug() << __FUNCTION__ << this << window() << m_data.hwnd;
if (m_data.hwnd) { // Stop event dispatching before Window is destroyed.
+ setFlag(WithinDestroy);
if (hasMouseCapture())
setMouseGrabEnabled(false);
unregisterDropSite();
- QWindowsContext::instance()->removeWindow(m_data.hwnd);
#ifdef QT_OPENGL_ES_2
if (m_eglSurface) {
if (QWindowsContext::verboseGL)
#endif
if (m_data.hwnd != GetDesktopWindow())
DestroyWindow(m_data.hwnd);
+ QWindowsContext::instance()->removeWindow(m_data.hwnd);
m_data.hwnd = 0;
}
}
SizeGripOperation = 0x100,
FrameStrutEventsEnabled = 0x200,
SynchronousGeometryChangeEvent = 0x400,
- WithinSetStyle = 0x800
+ WithinSetStyle = 0x800,
+ WithinDestroy = 0x1000
};
struct WindowData