diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 9b22b68..ad661db 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -845,7 +845,12 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) : QWindowsWindow::~QWindowsWindow() { #ifndef Q_OS_WINCE - QWindowSystemInterface::flushWindowSystemEvents(); + if (qEnvironmentVariableIsSet("NOFLUSH")) { + qDebug() << "*NO* FLUSH" << __FUNCTION__ << window(); + } else { + qDebug() << "FLUSH" << __FUNCTION__ << window(); + QWindowSystemInterface::flushWindowSystemEvents(); + } if (testFlag(TouchRegistered)) QWindowsContext::user32dll.unregisterTouchWindow(m_data.hwnd); #endif // !Q_OS_WINCE