Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.4.0 Beta
-
None
-
Windows 7/8
-
3d70925ee54d06e90bea392883d230b8ae2b1782 (qtbase/5.4.0, 7.11.2014)
Description
The following test case, when run on the direct2d platform plugin, enter a state where the event loop enters the system event processing loop, but does not wake up and deliver events to the application. The only thing that seems to work is resizing the window (to a larger size) to trigger a WM_PAINT which eventually wakes the event loop.
int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); for (int i = 0; i < 31; ++i) { QWindow *window = new QWindow; window->show(); } return app.exec(); }
After the window is resized, all the events which were waiting to be delivered (clicks, etc.) suddenly are.
Another related test case reveals the same behavior by creating new windows from an event filter. Holding any key will create windows continuously until the event loop blocks. Then, no new window are created until one of the windows is resized:
class EventFilter : public QObject { protected: bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE { if (event->type() == QEvent::KeyPress) { QWindow *window = new QWindow; window->show(); } return QObject::eventFilter(obj, event); } }; int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); EventFilter filter; app.installEventFilter(&filter); return app.exec(); }
Relevant commit: a4ac4b32 QWindowsGuiEventDispatcher: "Register timers in constructor". https://codereview.qt-project.org/#/c/97016/ for QTBUG-40881
Attachments
Issue Links
- is required for
-
QTBUG-41613 Issues to be fixed before 5.4.0 RC
- Closed
- resulted from
-
QTBUG-40881 Windows MFC migration framework:- Events are not propagated to QDialog embedded in a native window parent
- Closed