diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 424af20f26..c4dc270dde 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -3043,11 +3043,16 @@ void QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::E
         return;
     QWindowPrivate *p = qt_window_private(window);
 
+    qDebug() << __FUNCTION__ << window->objectName()
+             << "visible" << window->isVisible()
+             << "receivedExpose=" << p->receivedExpose
+             << "resizeEventPending" << p->resizeEventPending;
     if (!p->receivedExpose) {
         if (p->resizeEventPending) {
             // as a convenience for plugins, send a resize event before the first expose event if they haven't done so
             // window->geometry() should have a valid size as soon as a handle exists.
             QResizeEvent e(window->geometry().size(), p->geometry.size());
+             qDebug() << __FUNCTION__ << window->objectName() << "sending" << &e;
             QGuiApplication::sendSpontaneousEvent(window, &e);
 
             p->resizeEventPending = false;
diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp
index 0520f88935..fff53b486d 100644
--- a/src/plugins/platforms/windows/qwindowsscreen.cpp
+++ b/src/plugins/platforms/windows/qwindowsscreen.cpp
@@ -240,7 +240,7 @@ QWindow *QWindowsScreen::topLevelAt(const QPoint &point) const
     QWindow *result = nullptr;
     if (QWindow *child = QWindowsScreen::windowAt(point, CWP_SKIPINVISIBLE))
         result = QWindowsWindow::topLevelOf(child);
-    qCDebug(lcQpaWindows) <<__FUNCTION__ << point << result;
+//    qCDebug(lcQpaWindows) <<__FUNCTION__ << point << result;
     return result;
 }
 
@@ -250,7 +250,7 @@ QWindow *QWindowsScreen::windowAt(const QPoint &screenPoint, unsigned flags)
     if (QPlatformWindow *bw = QWindowsContext::instance()->
             findPlatformWindowAt(GetDesktopWindow(), screenPoint, flags))
         result = bw->window();
-    qCDebug(lcQpaWindows) <<__FUNCTION__ << screenPoint << " returns " << result;
+//    qCDebug(lcQpaWindows) <<__FUNCTION__ << screenPoint << " returns " << result;
     return result;
 }
 
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 0376e363f3..f7214f3a69 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -382,6 +382,7 @@ static bool shouldShowMaximizeButton(const QWindow *w, Qt::WindowFlags flags)
 // Qt::WindowTransparentForInput (in combination with WS_EX_TRANSPARENT).
 bool QWindowsWindow::setWindowLayered(HWND hwnd, Qt::WindowFlags flags, bool hasAlpha, qreal opacity)
 {
+    qDebug() << __FUNCTION__ << '>' <<hwnd << flags << hasAlpha << opacity;
     const LONG exStyle = GetWindowLong(hwnd, GWL_EXSTYLE);
     const bool needsLayered = (flags & Qt::WindowTransparentForInput)
         || (hasAlpha && (flags & Qt::FramelessWindowHint)) || opacity < 1.0;
@@ -393,11 +394,13 @@ bool QWindowsWindow::setWindowLayered(HWND hwnd, Qt::WindowFlags flags, bool has
             SetWindowLong(hwnd, GWL_EXSTYLE, exStyle & ~WS_EX_LAYERED);
         }
     }
+    qDebug() << __FUNCTION__ << '<' <<hwnd << "rets" << needsLayered;
     return needsLayered;
 }
 
 static void setWindowOpacity(HWND hwnd, Qt::WindowFlags flags, bool hasAlpha, bool accelerated, qreal level)
 {
+    qDebug() << __FUNCTION__ << hwnd << flags << hasAlpha << level;
     if (QWindowsWindow::setWindowLayered(hwnd, flags, hasAlpha, level)) {
         const BYTE alpha = BYTE(qRound(255.0 * level));
         if (hasAlpha && !accelerated && (flags & Qt::FramelessWindowHint)) {
@@ -750,7 +753,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 +769,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 +1094,8 @@ void QWindowsForeignWindow::setParent(const QPlatformWindow *newParentWindow)
 
 void QWindowsForeignWindow::setVisible(bool visible)
 {
-    qCDebug(lcQpaWindows) << __FUNCTION__ << window() << visible;
+    qDebug() << __FUNCTION__ << window() << visible
+             << geometry();
     if (visible)
         ShowWindow(handle(), SW_SHOWNOACTIVATE);
     else
@@ -1425,8 +1429,10 @@ void QWindowsWindow::setVisible(bool visible)
             // When the window is layered, we won't get WM_PAINT, and "we" are in control
             // over the rendering of the window
             // There is nobody waiting for this, so we don't need to flush afterwards.
-            if (isLayered())
+            if (isLayered()) {
+                qDebug() << __FUNCTION__ << "firing expose for layered";
                 fireExpose(QRect(0, 0, win->width(), win->height()));
+            }
             // QTBUG-44928, QTBUG-7386: This is to resolve the problem where popups are
             // opened from the system tray and not being implicitly activated
 
@@ -1678,6 +1684,10 @@ QRect QWindowsWindow::normalGeometry() const
 void QWindowsWindow::setGeometry(const QRect &rectIn)
 {
     QRect rect = rectIn;
+    qDebug() << __FUNCTION__ << window() << rectIn;
+    if (rectIn.width()> 1000 && window()->objectName() == QLatin1String("qtooltip_labelWindow")
+            && qEnvironmentVariableIsSet("CRASH"))
+        qFatal("Large ttt");
     // This means it is a call from QWindow::setFramePosition() and
     // the coordinates include the frame (size is still the contents rectangle).
     if (QWindowsGeometryHint::positionIncludesFrame(window())) {
@@ -1773,6 +1783,7 @@ void QWindowsWindow::handleGeometryChange()
 {
     const QRect previousGeometry = m_data.geometry;
     m_data.geometry = geometry_sys();
+    qDebug() << __FUNCTION__ << window() << 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.
@@ -1780,6 +1791,7 @@ void QWindowsWindow::handleGeometryChange()
         && m_data.geometry.size() != previousGeometry.size() // Exclude plain move
         // One dimension grew -> Windows will send expose, no need to synthesize.
         && !(m_data.geometry.width() > previousGeometry.width() || m_data.geometry.height() > previousGeometry.height())) {
+        qDebug() << __FUNCTION__ << "fireExpose" << window();
         fireExpose(QRect(QPoint(0, 0), m_data.geometry.size()), true);
     }
 
@@ -1871,7 +1883,7 @@ static inline bool isSoftwareGl()
 }
 
 bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message,
-                                         WPARAM, LPARAM)
+                                         WPARAM w, LPARAM l)
 {
     if (message == WM_ERASEBKGND) // Backing store - ignored.
         return true;
@@ -1898,6 +1910,10 @@ bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message,
     // If the a window is obscured by another window (such as a child window)
     // we still need to send isExposed=true, for compatibility.
     // Our tests depend on it.
+    qDebug() << __FUNCTION__ << hwnd << hex << w << l << dec << "rect" << updateRect
+              << "vis=" << window()->isVisible() << "native vis=" << IsWindowVisible(hwnd)
+              << "lay=" << hex << (GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_LAYERED)
+             << "firing expose";
     fireExpose(QRegion(qrectFromRECT(ps.rcPaint)), true);
     if (qSizeOfRect(updateRect) == m_data.geometry.size() && !QWindowsContext::instance()->asyncExpose())
         QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
@@ -1964,6 +1980,7 @@ void QWindowsWindow::handleWindowStateChange(Qt::WindowStates state)
         QWindow *w = window();
         bool exposeEventsSent = false;
         if (isLayered()) {
+            qDebug() << __FUNCTION__ << "firing expose for layered";
             fireExpose(QRegion(0, 0, w->width(), w->height()));
             exposeEventsSent = true;
         }
@@ -1972,6 +1989,7 @@ void QWindowsWindow::handleWindowStateChange(Qt::WindowStates state)
             if (child != w && child->isVisible() && child->transientParent() == w) {
                 QWindowsWindow *platformWindow = QWindowsWindow::windowsWindowOf(child);
                 if (platformWindow && platformWindow->isLayered()) {
+                    qDebug() << __FUNCTION__ << "firing expose for layered"<< platformWindow->window();
                     platformWindow->fireExpose(QRegion(0, 0, child->width(), child->height()));
                     exposeEventsSent = true;
                 }
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp
index cf0f3f153b..bdb3a167f3 100644
--- a/src/widgets/kernel/qtooltip.cpp
+++ b/src/widgets/kernel/qtooltip.cpp
@@ -537,6 +537,7 @@ QT_WARNING_POP
         new QTipLabel(text, pos, w, msecDisplayTime); // sets QTipLabel::instance to itself
 #endif
         QTipLabel::instance->setTipRect(w, rect);
+        qDebug() << __FUNCTION__ << w << rect;
         QTipLabel::instance->placeTip(pos, w);
         QTipLabel::instance->setObjectName(QLatin1String("qtooltip_label"));
 
diff --git a/src/widgets/widgets/qeffects.cpp b/src/widgets/widgets/qeffects.cpp
index bcc8d7815d..364d2858a3 100644
--- a/src/widgets/widgets/qeffects.cpp
+++ b/src/widgets/widgets/qeffects.cpp
@@ -529,6 +529,7 @@ void QRollEffect::scroll()
         if (orientation & UpScroll || orientation & LeftScroll)
             move(x, y);
 
+        qDebug() << __FUNCTION__ << w << h;
         resize(w, h);
         setUpdatesEnabled(true);
         repaint();
@@ -541,10 +542,12 @@ void QRollEffect::scroll()
                 setEnabled(true);
                 setFocus();
 #endif
+                qDebug() << __FUNCTION__ <<  "hide" << widget << widget->size();
                 widget->hide();
             } else {
                 //Since we are faking the visibility of the widget
                 //we need to unset the hidden state on it before calling show
+                qDebug() << __FUNCTION__ <<  "show/WA_WState_Hidden" << widget->size();
                 widget->setAttribute(Qt::WA_WState_Hidden, true);
                 widget->show();
                 lower();
@@ -561,6 +564,7 @@ void QRollEffect::scroll()
 */
 void qScrollEffect(QWidget* w, QEffects::DirFlags orient, int time)
 {
+    qDebug() << __FUNCTION__ << w << w->size() <<orient << time;
     if (q_roll) {
         q_roll->deleteLater();
         q_roll = 0;
@@ -583,6 +587,7 @@ void qScrollEffect(QWidget* w, QEffects::DirFlags orient, int time)
 */
 void qFadeEffect(QWidget* w, int time)
 {
+    qDebug() << __FUNCTION__ << w << w->size() <<time;
     if (q_blend) {
         q_blend->deleteLater();
         q_blend = 0;
