mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 20:44:14 +02:00
Fixed two-finger touch delay, and all other hidden event-pile-up.
Added a processEvents() call in the idle, because otherwise calling idle updates starves the event handlers.
This commit is contained in:
parent
010fe7fadd
commit
acef2bc669
1 changed files with 5 additions and 0 deletions
|
@ -946,6 +946,11 @@ void Application::idle() {
|
|||
// Only run simulation code if more than IDLE_SIMULATE_MSECS have passed since last time we ran
|
||||
|
||||
if (diffclock(&_lastTimeIdle, &check) > IDLE_SIMULATE_MSECS) {
|
||||
// We call processEvents() here because the idle timer takes priority over
|
||||
// event handling in Qt, so when the framerate gets low events will pile up
|
||||
// unless we handle them here.
|
||||
processEvents();
|
||||
|
||||
update(1.0f / _fps);
|
||||
|
||||
_glWidget->updateGL();
|
||||
|
|
Loading…
Reference in a new issue