diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-05 13:27:55 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-06 11:10:42 (GMT) |
commit | 9dcd06efae3e2d78ef402bf06e655e7e95550a39 (patch) | |
tree | 7b3fb015b40a11bd547a32a06388a6ab2c31f142 /src/corelib | |
parent | 6a061c1b66de4048222ef49c3d34c3e424e2a6c8 (diff) | |
download | Qt-9dcd06efae3e2d78ef402bf06e655e7e95550a39.zip Qt-9dcd06efae3e2d78ef402bf06e655e7e95550a39.tar.gz Qt-9dcd06efae3e2d78ef402bf06e655e7e95550a39.tar.bz2 |
The threshold for system basic timers has changed on windows
This breaks the animations in main window because dragging a dock widget
when it is undocked creates another event loop and the Qt events are not
processed any more.
Reviewed-by: Trust Me
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/animation/qabstractanimation.cpp | 6 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_win.cpp | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 6bbd801..2769040 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -162,9 +162,9 @@ //on windows if you're currently dragging a widget an inner eventloop was started by the system //to make sure that this timer is getting fired, we need to make sure to use the system timers //that will send a WM_TIMER event. We do that by settings the timer interval to 11 - //It is 11 because QEventDispatcherWin32Private::registerTimer specifically checks if the interval - //is greater than 10 to determine if it should use a system timer (or the multimedia timer). -#define STARTSTOP_TIMER_DELAY 11 + //It is 16 because QEventDispatcherWin32Private::registerTimer specifically checks if the interval + //is greater than 11 to determine if it should use a system timer (or the multimedia timer). +#define STARTSTOP_TIMER_DELAY 16 #else #define STARTSTOP_TIMER_DELAY 0 #endif diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index aae351c..1e6402f 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -539,6 +539,10 @@ void QEventDispatcherWin32Private::registerTimer(WinTimerInfo *t) int ok = 0; + //in the animation api, we delay the start of the animation + //for the dock widgets, we need to use a system timer because dragging a native window + //makes Windows start its own event loop. + //So if this threshold changes, please change STARTSTOP_TIMER_DELAY in qabstractanimation.cpp accordingly. if (t->interval > 15 || !t->interval || !qtimeSetEvent) { ok = 1; if (!t->interval) // optimization for single-shot-zero-timer |