summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-30 13:07:56 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-30 13:07:56 (GMT)
commit9809aae54f9df283549c2f5d9e216b232471eed3 (patch)
tree3d141b8f98941fd46ca7c02b1f59226c888f5916
parent46194955b223b65b08c300325d6de0620817aa04 (diff)
parenteb1015c7bbf135af3656110a4d112377c1209db8 (diff)
downloadQt-9809aae54f9df283549c2f5d9e216b232471eed3.zip
Qt-9809aae54f9df283549c2f5d9e216b232471eed3.tar.gz
Qt-9809aae54f9df283549c2f5d9e216b232471eed3.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Fix Qt applications freezing until mouse/keyboard events occur.
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index 8010a76..f63fa1d 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -65,7 +65,11 @@ extern uint qGlobalPostedEventsCount();
#endif
#ifndef QS_RAWINPUT
+# ifdef Q_OS_WINCE
+# define QS_RAWINPUT 0x0000
+# else
# define QS_RAWINPUT 0x0400
+# endif
#endif
#ifndef WM_TOUCH
@@ -78,8 +82,7 @@ extern uint qGlobalPostedEventsCount();
enum {
WM_QT_SOCKETNOTIFIER = WM_USER,
- WM_QT_SENDPOSTEDEVENTS = WM_USER + 1,
- SendPostedEventsTimerId = ~1u
+ WM_QT_SENDPOSTEDEVENTS = WM_USER + 1
};
#if defined(Q_OS_WINCE)
@@ -503,7 +506,9 @@ LRESULT CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
if (q) {
QEventDispatcherWin32Private *d = q->d_func();
int localSerialNumber = d->serialNumber;
- if (HIWORD(GetQueueStatus(QS_INPUT | QS_RAWINPUT | QS_TIMER)) == 0) {
+ MSG unused;
+ if ((HIWORD(GetQueueStatus(QS_INPUT | QS_RAWINPUT)) == 0
+ && PeekMessage(&unused, 0, WM_TIMER, WM_TIMER, PM_NOREMOVE) == 0)) {
// no more input or timer events in the message queue, we can allow posted events to be
// sent now
(void) d->wakeUps.fetchAndStoreRelease(0);
@@ -799,7 +804,7 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
pHandles[i] = d->winEventNotifierList.at(i)->handle();
emit aboutToBlock();
- waitRet = MsgWaitForMultipleObjectsEx(nCount, pHandles, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE);
+ waitRet = MsgWaitForMultipleObjectsEx(nCount, pHandles, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE | MWMO_INPUTAVAILABLE);
emit awake();
if (waitRet >= WAIT_OBJECT_0 && waitRet < WAIT_OBJECT_0 + nCount) {
d->activateEventNotifier(d->winEventNotifierList.at(waitRet - WAIT_OBJECT_0));