diff options
author | Phil Jones <philj56@gmail.com> | 2022-10-23 14:21:47 +0100 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2022-10-23 14:23:18 +0100 |
commit | a6fa0ebe77df9d1750ba3d035f55282dde9dcc87 (patch) | |
tree | cef4e092f82ed5b6409cadd9f9eb5783dfce989c /src | |
parent | 3bbd8ff839354a6f488c8481d5e6336a3f637cee (diff) |
Synchronise rendering with surface update.
This fixes an issue where receiving multiple keypresses in the time
taken to draw a frame could cause input to be out of sync with the
display.
Diffstat (limited to 'src')
-rw-r--r-- | src/input.c | 1 | ||||
-rw-r--r-- | src/main.c | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/src/input.c b/src/input.c index 2099863..0f69a05 100644 --- a/src/input.c +++ b/src/input.c @@ -86,7 +86,6 @@ void input_handle_keypress(struct tofi *tofi, xkb_keycode_t keycode) return; } - entry_update(&tofi->window.entry); tofi->window.surface.redraw = true; } @@ -1328,6 +1328,7 @@ int main(int argc, char *argv[]) wl_display_dispatch_pending(tofi.wl_display); if (tofi.window.surface.redraw) { + entry_update(&tofi.window.entry); surface_draw(&tofi.window.surface); tofi.window.surface.redraw = false; } |