Commit ea529b9
committed
Request animation frames when handling events, not when receiving them
Move RequestAnimationFrame() from the two event producers (the
TerminalInputParser callback and App::PostEvent) to the Event branch of
App::Internal::HandleTask, below the internal-reply early-returns.
A single place now decides which events grant an animation frame, next
to the code discriminating event kinds. As a result, every internal
terminal reply (cursor shape, terminal capabilities, name/version,
emulator) stops arming animation frames: previously only cursor
position reports were exempted, and only on the parser path. This also
moves the animation_requested_ write onto the main loop thread,
removing an unsynchronized write when PostEvent is called from another
thread.
Add a test covering the event -> animation tick pipeline. See #1302.1 parent eb52ba1 commit ea529b9
3 files changed
Lines changed: 65 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
10 | 18 | | |
11 | 19 | | |
12 | 20 | | |
| |||
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
38 | 93 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | 559 | | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | 560 | | |
569 | 561 | | |
570 | 562 | | |
| |||
926 | 918 | | |
927 | 919 | | |
928 | 920 | | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
929 | 928 | | |
930 | 929 | | |
931 | 930 | | |
| |||
1541 | 1540 | | |
1542 | 1541 | | |
1543 | 1542 | | |
1544 | | - | |
1545 | 1543 | | |
1546 | 1544 | | |
1547 | 1545 | | |
| |||
0 commit comments