mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-17 22:05:22 -05:00
presentation: store input timestamp in a per-commit context
This should reduce the risk of mixing up an input timestamp with the corresponding rendered frame.
This commit is contained in:
parent
3600099b52
commit
d6ea676ef2
3 changed files with 42 additions and 35 deletions
5
input.c
5
input.c
|
|
@ -528,12 +528,13 @@ keyboard_key(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial,
|
|||
term_to_slave(term, buf, count);
|
||||
}
|
||||
|
||||
clock_gettime(
|
||||
term->wl->presentation_clock_id, &term->render.input_time);
|
||||
term_reset_view(term);
|
||||
selection_cancel(term);
|
||||
|
||||
maybe_repeat:
|
||||
clock_gettime(
|
||||
term->wl->presentation_clock_id, &term->render.input_time);
|
||||
|
||||
if (should_repeat)
|
||||
start_repeater(wayl, key - 8);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue