diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index ae39411729..22cac9dcff 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -648,7 +648,9 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w,
         const qreal factor = QHighDpiScaling::factor(w);
         const QSize size = fixInitialSize(QHighDpi::fromNative(initialGeometry.size(), factor),
                                           w, defaultWidth, defaultHeight);
-        return QRect(initialGeometry.topLeft(), QHighDpi::toNative(size, factor));
+        QRect r= QRect(initialGeometry.topLeft(), QHighDpi::toNative(size, factor));
+        qDebug() << __FUNCTION__ << "child" << r;
+        return r;
     }
     const QScreen *screen = effectiveScreen(w);
     if (!screen)
@@ -672,7 +674,9 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w,
             }
         }
     }
-    return QHighDpi::toNativePixels(rect, screen);
+    QRect r= QHighDpi::toNativePixels(rect, screen);
+    qDebug() << __FUNCTION__ << "topl" << r;
+    return r;
 }
 
 /*!
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 1d8d6dfc95..4ca48409f6 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -592,6 +592,8 @@ QWindow::SurfaceType QWindow::surfaceType() const
 void QWindow::setVisible(bool visible)
 {
     Q_D(QWindow);
+    qDebug() << __FUNCTION__ << this << visible << "geom=" << geometry() << "plat=" << d->platformWindow;
+
 
     d->setVisible(visible);
 }
@@ -1616,6 +1618,7 @@ void QWindow::setGeometry(int posx, int posy, int w, int h)
 void QWindow::setGeometry(const QRect &rect)
 {
     Q_D(QWindow);
+    qDebug() << __FUNCTION__ << this << rect << "plat=" << d->platformWindow;
     d->positionAutomatic = false;
     const QRect oldRect = geometry();
     if (rect == oldRect)
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index e2087bd22f..ce752a3a6c 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -283,6 +283,7 @@ QWindowSystemInterfacePrivate::GeometryChangeEvent::GeometryChangeEvent(QWindow
 
 QT_DEFINE_QPA_EVENT_HANDLER(void, handleGeometryChange, QWindow *window, const QRect &newRect)
 {
+    qDebug() << __FUNCTION__ << window << newRect;
     Q_ASSERT(window);
     QWindowSystemInterfacePrivate::GeometryChangeEvent *e = new QWindowSystemInterfacePrivate::GeometryChangeEvent(window, QHighDpi::fromNativePixels(newRect, window));
     if (window->handle()) {
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index f9bac3920b..01c2388351 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -327,7 +327,7 @@ QPlatformWindow *QWindowsIntegration::createPlatformWindow(QWindow *window) cons
     QWindowsWindowData obtained =
         QWindowsWindowData::create(window, requested,
                                    QWindowsWindow::formatWindowTitle(window->title()));
-    qCDebug(lcQpaWindows).nospace()
+    qDebug().nospace()
         << __FUNCTION__ << ' ' << window
         << "\n    Requested: " << requested.geometry << " frame incl.="
         << QWindowsGeometryHint::positionIncludesFrame(window)
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 6b737207f5..e871b7575b 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -643,7 +643,7 @@ QWindowsWindowData
     const QWindowCreationContextPtr context(new QWindowCreationContext(w, rect, data.customMargins, style, exStyle));
     QWindowsContext::instance()->setWindowCreationContext(context);
 
-    qCDebug(lcQpaWindows).nospace()
+    qDebug().nospace()
         << "CreateWindowEx: " << w << " class=" << windowClassName << " title=" << title
         << '\n' << *this << "\nrequested: " << rect << ": "
         << context->frameWidth << 'x' <<  context->frameHeight
@@ -655,7 +655,7 @@ QWindowsWindowData
                                  context->frameX, context->frameY,
                                  context->frameWidth, context->frameHeight,
                                  parentHandle, NULL, appinst, NULL);
-    qCDebug(lcQpaWindows).nospace()
+    qDebug().nospace()
         << "CreateWindowEx: returns " << w << ' ' << result.hwnd << " obtained geometry: "
         << context->obtainedGeometry << ' ' << context->margins;
 
@@ -1120,9 +1120,10 @@ void QWindowsWindow::initialize()
     // will send the message) and screen change signals of QWindow.
     QWindow *w = window();
     if (w->type() != Qt::Desktop) {
+        qDebug() << __FUNCTION__ << creationContext->requestedGeometry << creationContext->obtainedGeometry;
         const Qt::WindowState state = w->windowState();
         if (state != Qt::WindowMaximized && state != Qt::WindowFullScreen
-            && creationContext->requestedGeometry != creationContext->obtainedGeometry) {
+            && creationContext->requestedGeometry != creationContext->obtainedGeometry) {            
             QWindowSystemInterface::handleGeometryChange(w, creationContext->obtainedGeometry);
         }
         QPlatformScreen *obtainedScreen = screenForGeometry(creationContext->obtainedGeometry);
@@ -1549,6 +1550,7 @@ QRect QWindowsWindow::normalGeometry() const
 
 void QWindowsWindow::setGeometry(const QRect &rectIn)
 {
+    qDebug() << '>' << __FUNCTION__ << window() << rectIn;
     QRect rect = rectIn;
     // This means it is a call from QWindow::setFramePosition() and
     // the coordinates include the frame (size is still the contents rectangle).
@@ -1659,7 +1661,7 @@ void QWindowsBaseWindow::setGeometry_sys(const QRect &rect) const
     const QMargins margins = frameMargins();
     const QRect frameGeometry = rect + margins;
 
-    qCDebug(lcQpaWindows) << '>' << __FUNCTION__ << window()
+    qDebug() << '>' << __FUNCTION__ << window()
         << "\n from " << geometry_sys() << " frame: "
         << margins << " to " <<rect
         << " new frame: " << frameGeometry;
