diff --git a/examples/widgets/mainwindows/mdi/mainwindow.cpp b/examples/widgets/mainwindows/mdi/mainwindow.cpp
index 188de18..48421f3 100644
--- a/examples/widgets/mainwindows/mdi/mainwindow.cpp
+++ b/examples/widgets/mainwindows/mdi/mainwindow.cpp
@@ -360,6 +360,7 @@ void MainWindow::createActions()
     }
 
     recentFileSeparator = fileMenu->addSeparator();
+    connect(fileMenu, &QMenu::aboutToShow, [] () { qDebug() << "## FileMenu: aboutToShow"; });
 
     setRecentFilesVisible(MainWindow::hasRecentFiles());
 
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index c94ea09..ba34014 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -1576,10 +1576,12 @@ void QWindow::setGeometry(const QRect &rect)
             nativeRect = QHighDpi::toNativePixels(rect, newScreen);
         else
             nativeRect = QHighDpi::toNativePixels(rect, this);
+        qDebug() << __FUNCTION__ << this << newScreen
+                 << "rect=" << rect << "nativeRect=" << nativeRect;
         d->platformWindow->setGeometry(nativeRect);
     } else {
         d->geometry = rect;
-
+        qDebug() << __FUNCTION__ << this << "[no platwin] rect=" << rect;
         if (rect.x() != oldRect.x())
             emit xChanged(rect.x());
         if (rect.y() != oldRect.y())
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 7ad4f57..81ce567 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -254,6 +254,7 @@ QT_DEFINE_QPA_EVENT_HANDLER(void, handleWindowStateChanged, QWindow *window, Qt:
 
 void QWindowSystemInterface::handleWindowScreenChanged(QWindow *window, QScreen *screen)
 {
+    qDebug() << __FUNCTION__ << window << screen;
     QWindowSystemInterfacePrivate::WindowScreenChangedEvent *e =
         new QWindowSystemInterfacePrivate::WindowScreenChangedEvent(window, screen);
     QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index 5745fc6..7e5c8e8 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -1089,8 +1089,10 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
 #endif
     }   break;
     case QtWindows::DpiChangedEvent: {
+
         platformWindow->setFlag(QWindowsWindow::WithinDpiChanged);
         const RECT *prcNewWindow = reinterpret_cast<RECT *>(lParam);
+        qDebug() << __FUNCTION__ << "WM_DPICHANGE" << *prcNewWindow;
         SetWindowPos(hwnd, NULL, prcNewWindow->left, prcNewWindow->top,
                      prcNewWindow->right - prcNewWindow->left,
                      prcNewWindow->bottom - prcNewWindow->top, SWP_NOZORDER | SWP_NOACTIVATE);
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 79dce2f..49b848e 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -947,7 +947,7 @@ void QWindowsForeignWindow::setParent(const QPlatformWindow *newParentWindow)
 
 void QWindowsForeignWindow::setVisible(bool visible)
 {
-    qCDebug(lcQpaWindows) << __FUNCTION__ << window() << visible;
+    qDebug() << __FUNCTION__ << window() << visible;
     if (visible)
         ShowWindow(handle(), SW_SHOWNOACTIVATE);
     else
@@ -1449,6 +1449,9 @@ QRect QWindowsWindow::normalGeometry() const
 
 void QWindowsWindow::setGeometry(const QRect &rectIn)
 {
+    qDebug() << __FUNCTION__ << rectIn;
+//    if (rectIn.x() < 3000 && window()->objectName() == QLatin1String("QMenuClassWindow"))
+//        qFatal("m2");
     QRect rect = rectIn;
     // This means it is a call from QWindow::setFramePosition() and
     // the coordinates include the frame (size is still the contents rectangle).
@@ -1524,6 +1527,7 @@ void QWindowsWindow::handleGeometryChange()
     const QRect previousGeometry = m_data.geometry;
     m_data.geometry = geometry_sys();
     QPlatformWindow::setGeometry(m_data.geometry);
+    qDebug() << __FUNCTION__ << m_data.geometry;
     QWindowSystemInterface::handleGeometryChange(window(), m_data.geometry);
     // QTBUG-32121: OpenGL/normal windows (with exception of ANGLE) do not receive
     // expose events when shrinking, synthesize.
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 17f87ef..b4aa85c 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -7130,6 +7130,8 @@ QSize QWidget::frameSize() const
 void QWidget::move(const QPoint &p)
 {
     Q_D(QWidget);
+    qDebug() << __FUNCTION__ << this << "WA_WState_Created=" <<testAttribute(Qt::WA_WState_Created)
+             << p << "geometry()=" << geometry();
     setAttribute(Qt::WA_Moved);
     if (testAttribute(Qt::WA_WState_Created)) {
         if (isWindow())
@@ -7185,7 +7187,9 @@ void QWidget::resize(const QSize &s)
 {
     Q_D(QWidget);
     setAttribute(Qt::WA_Resized);
-    if (testAttribute(Qt::WA_WState_Created)) {
+    qDebug() << __FUNCTION__ << this << s<< "WA_WState_Created=" <<testAttribute(Qt::WA_WState_Created)
+             << "geometry()=" << geometry();
+    if (testAttribute(Qt::WA_WState_Created)) {        
         d->fixPosIncludesFrame();
         d->setGeometry_sys(geometry().x(), geometry().y(), s.width(), s.height(), false);
         d->setDirtyOpaqueRegion();
@@ -7198,6 +7202,8 @@ void QWidget::resize(const QSize &s)
 void QWidget::setGeometry(const QRect &r)
 {
     Q_D(QWidget);
+    qDebug() << __FUNCTION__ << this << "WA_WState_Created=" <<testAttribute(Qt::WA_WState_Created)
+             << r << "geometry()=" << geometry();
     setAttribute(Qt::WA_Resized);
     setAttribute(Qt::WA_Moved);
     if (isWindow())
@@ -7219,6 +7225,7 @@ void QWidget::setGeometry(const QRect &r)
 void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
 {
     Q_Q(QWidget);
+    qDebug() << __FUNCTION__ << q << x << y << w << h << "isMove=" << isMove;
     if (extra) {                                // any size restrictions?
         w = qMin(w,extra->maxw);
         h = qMin(h,extra->maxh);
@@ -8161,6 +8168,7 @@ void QWidgetPrivate::hide_sys()
 
 void QWidget::setVisible(bool visible)
 {
+    qDebug() << __FUNCTION__ << this << visible << geometry();
     if (visible) { // show
         if (testAttribute(Qt::WA_WState_ExplicitShowHide) && !testAttribute(Qt::WA_WState_Hidden))
             return;
diff --git a/src/widgets/widgets/qeffects.cpp b/src/widgets/widgets/qeffects.cpp
index ecd85c2..6922541 100644
--- a/src/widgets/widgets/qeffects.cpp
+++ b/src/widgets/widgets/qeffects.cpp
@@ -189,6 +189,7 @@ bool QAlphaWidget::eventFilter(QObject *o, QEvent *e)
     case QEvent::Move:
         if (o != widget)
             break;
+        qDebug() << __FUNCTION__ << widget << widget->geometry();
         move(widget->geometry().x(),widget->geometry().y());
         update();
         break;
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 1925b58..0d57bd6 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -2397,6 +2397,7 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
             }
         }
     }
+    qDebug() << __FUNCTION__  << "screen=" << screen << pos << size;
     setGeometry(QRect(pos, size));
 #ifndef QT_NO_EFFECTS
     int hGuess = isRightToLeft() ? QEffects::LeftScroll : QEffects::RightScroll;
@@ -2794,8 +2795,13 @@ void QMenu::changeEvent(QEvent *e)
         e->type() == QEvent::LayoutDirectionChange) {
         d->itemsDirty = 1;
         setMouseTracking(style()->styleHint(QStyle::SH_Menu_MouseTracking, 0, this));
-        if (isVisible())
+        if (isVisible()) {
+            qDebug() << __FUNCTION__ << "sizeHint()=" << sizeHint()
+                     << geometry();
+            if (QWindow *wh = windowHandle())
+                qDebug() << __FUNCTION__ << wh->geometry() << wh->screen()->name();
             resize(sizeHint());
+        }
         if (!style()->styleHint(QStyle::SH_Menu_Scrollable, 0, this)) {
             delete d->scroll;
             d->scroll = 0;
