diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index cd57c16..8bb8fd1 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -356,6 +356,9 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
     static const QEvent::Type contextMenuTrigger =
         QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::ContextMenuOnMouseRelease).toBool() ?
         QEvent::MouseButtonRelease : QEvent::MouseButtonPress;
+    if (event->type() != QEvent::MouseMove)
+        qDebug() << " QWidgetWindow::handleMouseEvent " << this<< " qApp->d_func()->inPopupMode()="
+                 <<qApp->d_func()->inPopupMode();
     if (qApp->d_func()->inPopupMode()) {
         QWidget *activePopupWidget = qApp->activePopupWidget();
         QWidget *popup = activePopupWidget;
@@ -400,6 +403,8 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
             QMouseEvent e(event->type(), widgetPos, event->windowPos(), event->screenPos(), event->button(), event->buttons(), event->modifiers());
             QGuiApplicationPrivate::setMouseEventSource(&e, QGuiApplicationPrivate::mouseEventSource(event));
             e.setTimestamp(event->timestamp());
+            if (e.type() != QEvent::MouseMove)
+                qDebug() << __FUNCTION__ << "popup->isEnabled(): Sending to " << receiver;
             QApplicationPrivate::sendMouseEvent(receiver, &e, alien, m_widget, &qt_button_down, qt_last_mouse_receiver);
         } else {
             // close disabled popups when a mouse button is pressed or released
@@ -407,13 +412,18 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
             case QEvent::MouseButtonPress:
             case QEvent::MouseButtonDblClick:
             case QEvent::MouseButtonRelease:
+                qDebug() << __FUNCTION__ << "closing popup" << popup;
                 popup->close();
                 break;
             default:
                 break;
             }
         }
-
+        if (event->type() != QEvent::MouseMove) {
+            qDebug() << __FUNCTION__ << "qApp->activePopupWidget()=" << qApp->activePopupWidget()
+             << "activePopupWidget=" << activePopupWidget
+             << "qt_replay_popup_mouse_event=" << qt_replay_popup_mouse_event;
+        }
         if (qApp->activePopupWidget() != activePopupWidget
             && qt_replay_popup_mouse_event) {
             if (m_widget->windowType() != Qt::Popup)
@@ -436,9 +446,12 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
                         const QPoint localPos = win->mapFromGlobal(event->globalPos());
                         QMouseEvent *e = new QMouseEvent(QEvent::MouseButtonPress, localPos, localPos, event->globalPos(), event->button(), event->buttons(), event->modifiers());
                         QCoreApplicationPrivate::setEventSpontaneous(e, true);
+                        qDebug() << __FUNCTION__ << "replay to" << win;
                         QGuiApplicationPrivate::setMouseEventSource(e, QGuiApplicationPrivate::mouseEventSource(event));
                         e->setTimestamp(event->timestamp());
                         QCoreApplication::postEvent(win, e);
+                    } else {
+                        qDebug() << __FUNCTION__ << "outside replay receiver" << win  <<" discarding";
                     }
                 }
             }
@@ -492,9 +505,10 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
         // The preceding statement excludes MouseButtonPress events which caused
         // creation of a MouseButtonDblClick event. QTBUG-25831
         QMouseEvent translated(event->type(), mapped, event->windowPos(), event->screenPos(),
-                               event->button(), event->buttons(), event->modifiers());
+                               event->button(), event->buttons(), event->modifiers());        
         QGuiApplicationPrivate::setMouseEventSource(&translated, QGuiApplicationPrivate::mouseEventSource(event));
         translated.setTimestamp(event->timestamp());
+        qDebug() << __FUNCTION__ << "sending" << receiver;
         QApplicationPrivate::sendMouseEvent(receiver, &translated, widget, m_widget,
                                             &qt_button_down, qt_last_mouse_receiver);
     }
