diff --git a/examples/opengl/legacy/hellogl/main.cpp b/examples/opengl/legacy/hellogl/main.cpp
index 13581c8fb2..821a1ecdb2 100644
--- a/examples/opengl/legacy/hellogl/main.cpp
+++ b/examples/opengl/legacy/hellogl/main.cpp
@@ -50,6 +50,7 @@
 
 #include <QApplication>
 #include <QDesktopWidget>
+#include <QScreen>
 
 #include "window.h"
 
@@ -58,12 +59,10 @@ int main(int argc, char *argv[])
     QApplication app(argc, argv);
     Window window;
     window.resize(window.sizeHint());
-    int desktopArea = QApplication::desktop()->width() *
-                     QApplication::desktop()->height();
-    int widgetArea = window.width() * window.height();
-    if (((float)widgetArea / (float)desktopArea) < 0.75f)
-        window.show();
-    else
-        window.showMaximized();
+
+    window.move(QGuiApplication::screens().constLast()->geometry().center());
+
+
+    window.show();
     return app.exec();
 }
diff --git a/examples/opengl/legacy/hellogl/window.cpp b/examples/opengl/legacy/hellogl/window.cpp
index 58863909e0..f44c71511b 100644
--- a/examples/opengl/legacy/hellogl/window.cpp
+++ b/examples/opengl/legacy/hellogl/window.cpp
@@ -56,7 +56,7 @@
 //! [0]
 Window::Window()
 {
-    glWidget = new GLWidget;
+    glWidget = new GLWidget(this);
 
     xSlider = createSlider();
     ySlider = createSlider();
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index 2a0cb1094c..60655b97f4 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -47,7 +47,7 @@
 #include <QtGui/qscreen.h>
 #include <private/qhighdpiscaling_p.h>
 #include <private/qwindow_p.h>
-
+#include <QDebug>
 
 QT_BEGIN_NAMESPACE
 
@@ -648,9 +648,12 @@ static inline const QScreen *effectiveScreen(const QWindow *window)
     const QList<QScreen *> siblings = screen->virtualSiblings();
     if (siblings.size() > 1) {
         const QPoint referencePoint = window->transientParent() ? window->transientParent()->geometry().center() : QCursor::pos();
+        qDebug() << __FUNCTION__ << "ref point from cursor" << referencePoint;
         for (const QScreen *sibling : siblings) {
-            if (sibling->geometry().contains(referencePoint))
+            if (sibling->geometry().contains(referencePoint)) {
+                qDebug() << __FUNCTION__ << "rets " << sibling;
                 return sibling;
+            }
         }
     }
 #endif
@@ -697,6 +700,8 @@ static QSize fixInitialSize(QSize size, const QWindow *w,
 QRect QPlatformWindow::initialGeometry(const QWindow *w,
     const QRect &initialGeometry, int defaultWidth, int defaultHeight)
 {
+    qDebug() << '\n' << __FUNCTION__ << w << w->isTopLevel() << w->screen()->name()
+             << initialGeometry;
     if (!w->isTopLevel()) {
         const qreal factor = QHighDpiScaling::factor(w);
         const QSize size = fixInitialSize(QHighDpi::fromNative(initialGeometry.size(), factor),
@@ -718,6 +723,7 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w,
         rect.setSize(fixInitialSize(rect.size(), w, defaultWidth, defaultHeight));
     if (position) {
         const QRect availableGeometry = screen->availableGeometry();
+          qDebug() << __FUNCTION__ << "av=" << availableGeometry << screen;
         // Center unless the geometry ( + unknown window frame) is too large for the screen).
         if (rect.height() < (availableGeometry.height() * 8) / 9
                 && rect.width() < (availableGeometry.width() * 8) / 9) {
@@ -732,7 +738,9 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w,
             }
         }
     }
-    return QHighDpi::toNativePixels(rect, screen);
+    auto  r= QHighDpi::toNativePixels(rect, screen);
+    qDebug() << __FUNCTION__ << w << "rets" << r << screen->name() << '\n';
+     return r;
 }
 
 /*!
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index b71a0c54aa..6ee9417276 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -1656,6 +1656,7 @@ void QWindow::setGeometry(const QRect &rect)
     Q_D(QWindow);
     d->positionAutomatic = false;
     const QRect oldRect = geometry();
+    qDebug() << __FUNCTION__ << this << oldRect << rect;
     if (rect == oldRect)
         return;
 
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index f7d04b667d..6138d6eed6 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -1218,6 +1218,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
         platformWindow->handleResized(static_cast<int>(wParam));
         return true;
     case QtWindows::QuerySizeHints:
+        qDebug() << __FUNCTION__ << msg;
         platformWindow->getSizeHints(reinterpret_cast<MINMAXINFO *>(lParam));
         return true;// maybe available on some SDKs revisit WM_NCCALCSIZE
     case QtWindows::CalculateSize:
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index a4f4099aa6..1b0440ada0 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -776,8 +776,9 @@ QWindowsWindowData
     QMargins invMargins = topLevel && hasFrame && QWindowsGeometryHint::positionIncludesFrame(w)
             ? invisibleMargins(QPoint(context->frameX, context->frameY)) : QMargins();
 
-    qCDebug(lcQpaWindows).nospace()
-        << "CreateWindowEx: " << w << " class=" << windowClassName << " title=" << title
+    qDebug().nospace().noquote() << __FUNCTION__
+        << " CreateWindowEx: \"" << w->objectName() << "\" on \"" << w->screen()->name()
+        << "\" class=" << windowClassName << " title=" << title
         << '\n' << *this << "\nrequested: " << rect << ": "
         << context->frameWidth << 'x' <<  context->frameHeight
         << '+' << context->frameX << '+' << context->frameY
@@ -802,8 +803,8 @@ QWindowsWindowData
                                  pos.x(), pos.y(),
                                  context->frameWidth, context->frameHeight,
                                  parentHandle, nullptr, appinst, nullptr);
-    qCDebug(lcQpaWindows).nospace()
-        << "CreateWindowEx: returns " << w << ' ' << result.hwnd << " obtained geometry: "
+    qDebug().nospace() << __FUNCTION__
+        << " CreateWindowEx: returns \"" << w->objectName() << "\" " << result.hwnd << " obtained geometry: "
         << context->obtainedPos << context->obtainedSize << ' ' << context->margins;
 
     if (!result.hwnd) {
@@ -1023,7 +1024,9 @@ void QWindowsGeometryHint::applyToMinMaxInfo(const QWindow *w,
     QSize minimumSize;
     QSize maximumSize;
     frameSizeConstraints(w, margins, &minimumSize, &maximumSize);
-    qCDebug(lcQpaWindows).nospace() << '>' << __FUNCTION__ << '<' << " min="
+    qDebug().nospace() << '>' << __FUNCTION__
+        << w << w->screen()
+        << '<' << " min="
         << minimumSize.width() << ',' << minimumSize.height()
         << " max=" << maximumSize.width() << ',' << maximumSize.height()
         << " margins=" << margins
@@ -1967,7 +1970,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;
@@ -2394,6 +2397,7 @@ bool QWindowsWindow::handleGeometryChangingMessage(MSG *message, const QWindow *
     const QRect correctedFrameGeometry = correctedGeometryF.toRect() + margins;
     if (correctedFrameGeometry == suggestedFrameGeometry)
         return false;
+    qDebug() << __FUNCTION__ << qWindow << suggestedFrameGeometry << "corr=" << correctedFrameGeometry;
     windowPos->x = correctedFrameGeometry.left();
     windowPos->y = correctedFrameGeometry.top();
     windowPos->cx = correctedFrameGeometry.width();
@@ -2632,6 +2636,7 @@ static int getBorderWidth(const QPlatformScreen *screen)
 
 void QWindowsWindow::getSizeHints(MINMAXINFO *mmi) const
 {
+    qDebug() << __FUNCTION__;
     // We don't apply the min/max size hint as we change the dpi, because we did not adjust the
     // QScreen of the window yet so we don't have the min/max with the right ratio
     if (!testFlag(QWindowsWindow::WithinDpiChanged))
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index e9968e41b4..32a6503f34 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -3942,6 +3942,7 @@ void QWidget::setBaseSize(int basew, int baseh)
 
 void QWidget::setFixedSize(const QSize & s)
 {
+    qDebug() << __FUNCTION__ << this << s;
     setFixedSize(s.width(), s.height());
 }
 
@@ -6938,6 +6939,7 @@ QSize QWidget::frameSize() const
 
 void QWidget::move(const QPoint &p)
 {
+    qDebug() << __FUNCTION__ << this << p;
     Q_D(QWidget);
     setAttribute(Qt::WA_Moved);
     if (testAttribute(Qt::WA_WState_Created)) {
@@ -6998,6 +7000,7 @@ void QWidgetPrivate::fixPosIncludesFrame()
 
 void QWidget::resize(const QSize &s)
 {
+    qDebug() << __FUNCTION__ << this << s;
     Q_D(QWidget);
     setAttribute(Qt::WA_Resized);
     if (testAttribute(Qt::WA_WState_Created)) {
