diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index d3bb370eb8..ef161798fe 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1394,6 +1394,7 @@ void QWindowsWindow::initialize()
 
 void QWindowsWindow::fireExpose(const QRegion &region, bool force)
 {
+    qDebug() << __FUNCTION__ << region.boundingRect() << force;
     if (region.isEmpty() && !force)
         clearFlag(Exposed);
     else
@@ -1557,7 +1558,9 @@ QWindowsWindowData
 void QWindowsWindow::setVisible(bool visible)
 {
     const QWindow *win = window();
-    qCDebug(lcQpaWindows) << __FUNCTION__ << this << win << m_data.hwnd << visible;
+    qDebug() << __FUNCTION__ << this << win << m_data.hwnd << visible
+             << win->windowStates()
+              << win->geometry();
     if (m_data.hwnd) {
         if (visible) {
             show_sys();
@@ -1893,6 +1896,7 @@ void QWindowsWindow::setGeometry(const QRect &rectIn)
 
 void QWindowsWindow::handleMoved()
 {
+    qDebug() << __FUNCTION__;
     // Minimize/Set parent can send nonsensical move events.
     if (!IsIconic(m_data.hwnd) && !testFlag(WithinSetParent))
         handleGeometryChange();
@@ -1900,6 +1904,7 @@ void QWindowsWindow::handleMoved()
 
 void QWindowsWindow::handleResized(int wParam)
 {
+    qDebug() << __FUNCTION__ << Qt::hex << wParam;
     switch (wParam) {
     case SIZE_MAXHIDE: // Some other window affected.
     case SIZE_MAXSHOW:
@@ -1957,9 +1962,10 @@ void QWindowsWindow::checkForScreenChanged(ScreenChangeMode mode)
 }
 
 void QWindowsWindow::handleGeometryChange()
-{
-    const QRect previousGeometry = m_data.geometry;
+{    
+    const QRect previousGeometry = m_data.geometry;    
     m_data.geometry = geometry_sys();
+    qDebug() << __FUNCTION__ << previousGeometry << m_data.geometry ;
     if (testFlag(WithinDpiChanged)
         && QWindowsContext::instance()->screenManager().screenForHwnd(m_data.hwnd) != screen()) {
         return; // QGuiApplication will send resize when screen actually changes
@@ -2157,8 +2163,9 @@ QWindowsWindowData QWindowsWindow::setWindowFlags_sys(Qt::WindowFlags wt,
 
 void QWindowsWindow::handleWindowStateChange(Qt::WindowStates state)
 {
-    qCDebug(lcQpaWindows) << __FUNCTION__ << this << window()
-                 << "\n    from " << m_windowState << " to " << state;
+    qDebug() << __FUNCTION__ << this << window()
+                 << "\n    from " << m_windowState << " to " << state
+                 << m_data.geometry;
     m_windowState = state;
     QWindowSystemInterface::handleWindowStateChanged(window(), state);
     if (state & Qt::WindowMinimized) {
@@ -2183,8 +2190,10 @@ void QWindowsWindow::handleWindowStateChange(Qt::WindowStates state)
                 }
             }
         }
-        if (exposeEventsSent && !QWindowsContext::instance()->asyncExpose())
-            QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
+        if (exposeEventsSent && !QWindowsContext::instance()->asyncExpose()) {
+             qDebug() << __FUNCTION__ << this << "flush";
+           QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
+        }
     }
 }
 
@@ -2224,7 +2233,7 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowStates newState)
     const Qt::WindowStates oldState = m_windowState;
     if (oldState == newState)
         return;
-    qCDebug(lcQpaWindows) << '>' << __FUNCTION__ << this << window()
+    qDebug() << '>' << __FUNCTION__ << this << window()
         << " from " << oldState << " to " << newState;
 
     const bool visible = isVisible();
@@ -2274,6 +2283,7 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowStates newState)
                 const UINT swpf = SWP_FRAMECHANGED | SWP_NOACTIVATE;
                 const bool wasSync = testFlag(SynchronousGeometryChangeEvent);
                 setFlag(SynchronousGeometryChangeEvent);
+                qDebug() << __FUNCTION__ << "to full geom" << m_savedFrameGeometry << "->" <<   r;
                 SetWindowPos(m_data.hwnd, HWND_TOP, r.left(), r.top(), r.width(), r.height(), swpf);
                 if (!wasSync)
                     clearFlag(SynchronousGeometryChangeEvent);
@@ -2295,6 +2305,8 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowStates newState)
             if (!screen->geometry().intersects(m_savedFrameGeometry))
                 m_savedFrameGeometry.moveTo(screen->geometry().topLeft());
 
+            qDebug() << __FUNCTION__ << "from full " << m_data.geometry << "->" << m_savedFrameGeometry;
+
             if (newState & Qt::WindowMinimized) {
                 setMinimizedGeometry(m_data.hwnd, m_savedFrameGeometry);
                 if (stateChange & Qt::WindowMaximized)
@@ -2329,6 +2341,7 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowStates newState)
             setFlag(WithinMaximize);
             if (newState & Qt::WindowFullScreen)
                 setFlag(MaximizeToFullScreen);
+            qDebug() << "to max" << newState;
             ShowWindow(m_data.hwnd,
                        (newState & Qt::WindowMaximized) ? SW_MAXIMIZE : SW_SHOWNOACTIVATE);
             clearFlag(WithinMaximize);
