Details
-
Bug
-
Resolution: Incomplete
-
P1: Critical
-
None
-
5.6.2
-
Linux
Description
When a custom event is send to simulate click event on QWidget in a test case as follows:
SendX11Event(ButtonPress, ButtonPressMask, QPoint(0, 0));
SendX11Event(ButtonRelease, ButtonReleaseMask, QPoint(0, 0));
Windows under test receives the event and process it normally, then it has been deleted and move on to next test that uses QWidget and there it crashes.
It Appears that perhaps deleted window pointer is dangling. Following patch fixes this problem.
diff -r 0bf55f62cd8b -r 33a1a8194f8e src/qtbase/src/plugins/platforms/xcb/qxcbwindow.cpp --- a/src/plugins/platforms/xcb/qxcbwindow.cpp Thu Feb 02 15:35:54 2017 +0100 +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp Mon Feb 13 14:24:50 2017 -0600 @@ -636,6 +636,8 @@ doFocusOut(); if (connection()->mouseGrabber() == this) connection()->setMouseGrabber(Q_NULLPTR); + if (connection()->mousePressWindow() == this) + connection()->setMousePressWindow(Q_NULLPTR); if (m_syncCounter && m_usingSyncProtocol) Q_XCB_CALL(xcb_sync_destroy_counter(xcb_connection(), m_syncCounter));
This seems like regression in Qt5.6.2. Qt5.6.0 works good.