summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-12-04 19:08:36 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-12-04 19:08:36 +0200
commit8c0ce575d06e10ac9f2ec60c0816443005533d53 (patch)
treed94dff7346fcb6ce30616f7d68265357d275ee4f /src/app.c
parent63d39ae7a8f2c10bb2304edefee8dd1034b96693 (diff)
iOS: Position system input controls during animation
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/app.c b/src/app.c
index 587efd00..52072d39 100644
--- a/src/app.c
+++ b/src/app.c
@@ -1455,11 +1455,17 @@ backToMainLoop:;
1455static void runTickers_App_(iApp *d) { 1455static void runTickers_App_(iApp *d) {
1456 const uint32_t now = SDL_GetTicks(); 1456 const uint32_t now = SDL_GetTicks();
1457 d->elapsedSinceLastTicker = (d->lastTickerTime ? now - d->lastTickerTime : 0); 1457 d->elapsedSinceLastTicker = (d->lastTickerTime ? now - d->lastTickerTime : 0);
1458 d->lastTickerTime = now; 1458 d->lastTickerTime = now;
1459 if (isEmpty_SortedArray(&d->tickers)) { 1459 if (isEmpty_SortedArray(&d->tickers)) {
1460 d->lastTickerTime = 0; 1460 d->lastTickerTime = 0;
1461 return; 1461 return;
1462 } 1462 }
1463 iForIndices(i, d->window->base.roots) {
1464 iRoot *root = d->window->base.roots[i];
1465 if (root) {
1466 root->didAnimateVisualOffsets = iFalse;
1467 }
1468 }
1463 /* Tickers may add themselves again, so we'll run off a copy. */ 1469 /* Tickers may add themselves again, so we'll run off a copy. */
1464 iSortedArray *pending = copy_SortedArray(&d->tickers); 1470 iSortedArray *pending = copy_SortedArray(&d->tickers);
1465 clear_SortedArray(&d->tickers); 1471 clear_SortedArray(&d->tickers);
@@ -1476,6 +1482,10 @@ static void runTickers_App_(iApp *d) {
1476 if (isEmpty_SortedArray(&d->tickers)) { 1482 if (isEmpty_SortedArray(&d->tickers)) {
1477 d->lastTickerTime = 0; 1483 d->lastTickerTime = 0;
1478 } 1484 }
1485 iForIndices(i, d->window->base.roots) {
1486 iRoot *root = d->window->base.roots[i];
1487 notifyVisualOffsetChange_Root(root);
1488 }
1479} 1489}
1480 1490
1481static int resizeWatcher_(void *user, SDL_Event *event) { 1491static int resizeWatcher_(void *user, SDL_Event *event) {