qt5base-lts/tests/auto/gui/kernel
Alex Trotsenko 81408c0e76 QEventDispatcherWin32: avoid livelock in a foreign event loop
According to Windows docs, GetMessage() function retrieves the messages
from the input queue in defined order, where posted messages are
processed ahead of input messages, even if they were posted later.
Therefore, if the application produces a posted event permanently, as
a result of processing that event, user input messages may be blocked
due to hard CPU usage by the application.

It's not a problem, if an internal Qt event loop is running. By calling
sendPostedEvents() on the beginning of processEvents(), we are sending
posted events only once per iteration. However, during execution of
the foreign loop, we should artificially lower the priority of the
WM_QT_SENDPOSTEDEVENTS message in order to enable delivery of other
input messages.

To solve the problem, it is proposed to postpone the
WM_QT_SENDPOSTEDEVENTS message until the message queue becomes empty,
as it works for the internal loop.

Task-number: QTBUG-77464
Change-Id: I8dedb6837c6fc41aa6f497e67ab2352c2b4f3772
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-08-29 09:12:29 +00:00
..
noqteventloop QEventDispatcherWin32: avoid livelock in a foreign event loop 2019-08-29 09:12:29 +00:00
qbackingstore Updated license headers 2016-01-21 18:55:18 +00:00
qclipboard QProcess: mark obsolete functions as deprecated 2019-01-23 18:49:12 +00:00
qcursor tst_QCursor::equality(): Silence warnings 2018-04-05 09:00:39 +00:00
qdrag Remove usages of deprecated APIs of qtbase/gui 2019-07-13 10:43:15 +02:00
qevent Updated license headers 2016-01-21 18:55:18 +00:00
qfileopenevent Fix test for sandboxed targets 2016-09-15 14:25:50 +00:00
qguiapplication unblacklist passing tests 2019-07-08 11:01:42 +00:00
qguieventdispatcher unblacklist passing tests 2019-07-08 11:01:42 +00:00
qguieventloop unblacklist passing tests 2019-07-08 11:01:42 +00:00
qguimetatype Remove usages of deprecated APIs of qtbase/gui 2019-07-13 10:43:15 +02:00
qguitimer Update for failures only on dev branch. Use general platform names 2019-08-19 18:22:11 +02:00
qguivariant Remove tests/auto/qtest-config.h. 2016-04-12 14:56:49 +00:00
qhighdpiscaling Add nullptr guard to QHighDScaling::scaleAndOrigin(QPlatformScreen *) 2019-08-11 12:01:26 +02:00
qinputmethod tst_QInputMethod check WindowActivation capability instead of platform 2018-03-12 10:51:32 +00:00
qkeyevent Remove usages of deprecated APIs from QtAlgorithms 2019-06-29 21:58:36 +02:00
qkeysequence Remove usages of deprecated APIs from QtAlgorithms 2019-06-29 21:58:36 +02:00
qmouseevent Add helper function to reset QMouseEvent localPos 2016-08-01 09:58:23 +00:00
qmouseevent_modal Updated license headers 2016-01-21 18:55:18 +00:00
qopenglwindow tests/auto/gui/kernel: Use QTRY_VERIFY instead of manual wait loops 2018-04-11 06:11:27 +00:00
qpalette Remove handling of missing Q_COMPILER_RVALUE_REFS 2019-05-01 20:24:45 +00:00
qpixelformat Updated license headers 2016-01-21 18:55:18 +00:00
qrasterwindow tests/auto/gui/kernel: Use QTRY_VERIFY instead of manual wait loops 2018-04-11 06:11:27 +00:00
qscreen Updated license headers 2016-01-21 18:55:18 +00:00
qsurfaceformat Updated license headers 2016-01-21 18:55:18 +00:00
qtouchevent unblacklist passing tests 2019-07-08 11:01:42 +00:00
qwindow Update for failures only on dev branch. Use general platform names 2019-08-19 18:22:11 +02:00
kernel.pro QHighDPI: Fix broken scaling of QPoint(F) 2019-08-01 13:20:23 +02:00