diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index 50f05721f7..c814600361 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -705,6 +705,8 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w,
                                           w, defaultWidth, defaultHeight);
         return QRect(initialGeometry.topLeft(), QHighDpi::toNative(size, factor));
     }
+    qDebug() << '\n' << __FUNCTION__ << w << "initialGeometry=" << initialGeometry
+             <<  "defs=" << defaultWidth <<  defaultHeight;
     const QScreen *screen = effectiveScreen(w);
     if (!screen)
         return initialGeometry;
@@ -727,6 +729,7 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w,
             }
         }
     }
+    qDebug() << __FUNCTION__ << "rets" << rect;
     return QHighDpi::toNativePixels(rect, screen);
 }
 
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 2c0ffc9b26..0549439ad6 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -750,7 +750,7 @@ QWindowsWindowData
     QMargins invMargins = topLevel && hasFrame && QWindowsGeometryHint::positionIncludesFrame(w)
             ? invisibleMargins(QPoint(context->frameX, context->frameY)) : QMargins();
 
-    qCDebug(lcQpaWindows).nospace()
+    qDebug().nospace()
         << "CreateWindowEx: " << w << " class=" << windowClassName << " title=" << title
         << '\n' << *this << "\nrequested: " << rect << ": "
         << context->frameWidth << 'x' <<  context->frameHeight
@@ -766,7 +766,7 @@ QWindowsWindowData
                                  pos.x(), pos.y(),
                                  context->frameWidth, context->frameHeight,
                                  parentHandle, nullptr, appinst, nullptr);
-    qCDebug(lcQpaWindows).nospace()
+    qDebug().nospace()
         << "CreateWindowEx: returns " << w << ' ' << result.hwnd << " obtained geometry: "
         << context->obtainedGeometry << ' ' << context->margins;
 
@@ -1091,7 +1091,7 @@ void QWindowsForeignWindow::setParent(const QPlatformWindow *newParentWindow)
 
 void QWindowsForeignWindow::setVisible(bool visible)
 {
-    qCDebug(lcQpaWindows) << __FUNCTION__ << window() << visible;
+    qDebug() << __FUNCTION__ << window() << visible << window()->geometry();
     if (visible)
         ShowWindow(handle(), SW_SHOWNOACTIVATE);
     else
@@ -1245,14 +1245,26 @@ void QWindowsWindow::initialize()
     // Trigger geometry change (unless it has a special state in which case setWindowState()
     // will send the message) and screen change signals of QWindow.
     if (w->type() != Qt::Desktop) {
+        auto asynch = qEnvironmentVariableIsSet("ASYNC");
         const Qt::WindowState state = w->windowState();
         if (state != Qt::WindowMaximized && state != Qt::WindowFullScreen
             && creationContext->requestedGeometryIn != creationContext->obtainedGeometry) {
-            QWindowSystemInterface::handleGeometryChange<QWindowSystemInterface::SynchronousDelivery>(w, creationContext->obtainedGeometry);
+            qDebug() << w << "asynch=" << asynch << "geom"
+                     << creationContext->requestedGeometryIn << "->" <<creationContext->obtainedGeometry;
+            if (asynch)
+                QWindowSystemInterface::handleGeometryChange(w, creationContext->obtainedGeometry);
+            else
+                QWindowSystemInterface::handleGeometryChange<QWindowSystemInterface::SynchronousDelivery>(w, creationContext->obtainedGeometry);
         }
         QPlatformScreen *obtainedScreen = screenForGeometry(creationContext->obtainedGeometry);
-        if (obtainedScreen && screen() != obtainedScreen)
-            QWindowSystemInterface::handleWindowScreenChanged<QWindowSystemInterface::SynchronousDelivery>(w, obtainedScreen->screen());
+        if (obtainedScreen && screen() != obtainedScreen) {
+            qDebug() << w << "asynch=" << asynch << "geom"
+                     << screen() << "->" << obtainedScreen;
+            if (asynch)
+                QWindowSystemInterface::handleWindowScreenChanged(w, obtainedScreen->screen());
+            else
+                QWindowSystemInterface::handleWindowScreenChanged<QWindowSystemInterface::SynchronousDelivery>(w, obtainedScreen->screen());
+        }
     }
 }
 
@@ -1790,7 +1802,7 @@ void QWindowsWindow::handleGeometryChange()
     if (testFlag(SynchronousGeometryChangeEvent))
         QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
 
-    qCDebug(lcQpaEvents) << __FUNCTION__ << this << window() << m_data.geometry;
+    qDebug() << __FUNCTION__ << this << window() << m_data.geometry;
 }
 
 void QWindowsBaseWindow::setGeometry_sys(const QRect &rect) const
@@ -1798,7 +1810,7 @@ void QWindowsBaseWindow::setGeometry_sys(const QRect &rect) const
     const QMargins margins = fullFrameMargins();
     const QRect frameGeometry = rect + margins;
 
-    qCDebug(lcQpaWindows) << '>' << __FUNCTION__ << window()
+    qDebug() << '>' << __FUNCTION__ << window()
         << "\n from " << geometry_sys() << " frame: "
         << margins << " to " <<rect
         << " new frame: " << frameGeometry;
diff --git a/src/widgets/widgets/qeffects.cpp b/src/widgets/widgets/qeffects.cpp
index bcc8d7815d..9007db7387 100644
--- a/src/widgets/widgets/qeffects.cpp
+++ b/src/widgets/widgets/qeffects.cpp
@@ -394,12 +394,16 @@ QRollEffect::QRollEffect(QWidget* w, Qt::WindowFlags f, DirFlags orient)
 
     setAttribute(Qt::WA_NoSystemBackground, true);
 
+
     if (widget->testAttribute(Qt::WA_Resized)) {
+
         totalWidth = widget->width();
         totalHeight = widget->height();
+        qDebug() << __FUNCTION__ << this << "size" << totalWidth << totalHeight;
     } else {
         totalWidth = widget->sizeHint().width();
         totalHeight = widget->sizeHint().height();
+        qDebug() << __FUNCTION__ << this << "sizeHint" << totalWidth << totalHeight;
     }
 
     currentHeight = totalHeight;
@@ -530,6 +534,7 @@ void QRollEffect::scroll()
             move(x, y);
 
         resize(w, h);
+        qDebug() << __FUNCTION__ << w <<h;
         setUpdatesEnabled(true);
         repaint();
     }
