diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2021-10-13 02:06:49 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2021-10-13 16:32:31 +0300 |
commit | 33a16ae04270647e99dc0741b706061e6468fa3c (patch) | |
tree | 085af7971cbda626fa46a88b0e66c832cef37b20 /src/symbols.c | |
parent | 3ed4116a989036b454f22471736ceba0084b68ca (diff) | |
download | sciteco-33a16ae04270647e99dc0741b706061e6468fa3c.tar.gz |
GTK: prevent crashes when pressing keys very quickly
* teco_interface_key_pressed_cb() could be called multiple times __before__
the idle timer (teco_interface_pop_key_idle_cb()) fires.
The recursion check would consequently not work and we started the
idle timer multiple times.
This would eventually crash.
* We now process the first queued key immediately.
The alternative would be to store the idle watcher id.
* The idle watcher's priority has been increased.
Since redrawing is guaranteed to take place at G_PRIORITY_HIGH_IDLE,
it is sufficient to process keys at G_PRIORITY_DEFAULT_IDLE.
* Should also reduce latency slightly.
* fixes up 71bf522231d2998f1fb183f343c2b1f9dbcd3b15
Diffstat (limited to 'src/symbols.c')
0 files changed, 0 insertions, 0 deletions