From b8be2e67eae075e6c6108318e73c7ad4eddcebf8 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 9 Nov 2012 15:57:07 +0200 Subject: Change to enter/leave policy while grabbing. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sending enter and leave events to other windows than the grabbing window is not logical. The policy should be that only the grabbing window receives enter and leave events. Changed the documentation accordingly and provided the necessary changes to Windows implementation. Also removed explicit leave event generation for widgets when popup is opened as that is now redundant. tst_QWidget::underMouse() test was changed to behave according to new logic. Task-number: QTBUG-27871 Change-Id: I127fb8685b4a4206d1a319f42cba491ec02bc8ca Reviewed-by: Oliver Wolff Reviewed-by: Samuel Rødal Reviewed-by: Friedemann Kleint --- src/widgets/kernel/qapplication_qpa.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/widgets/kernel/qapplication_qpa.cpp') diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp index e8db364473..21bc9506d4 100644 --- a/src/widgets/kernel/qapplication_qpa.cpp +++ b/src/widgets/kernel/qapplication_qpa.cpp @@ -250,13 +250,6 @@ void QApplicationPrivate::openPopup(QWidget *popup) QApplication::sendEvent(fw, &e); } } - - // Dispatch leave for last mouse receiver to update undermouse states - if (qt_last_mouse_receiver && !QWidget::mouseGrabber()) { - QApplicationPrivate::dispatchEnterLeave(0, qt_last_mouse_receiver.data(), - QGuiApplicationPrivate::lastCursorPosition); - qt_last_mouse_receiver = 0; - } } void QApplicationPrivate::initializeMultitouch_sys() -- cgit v1.2.3