mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-12 04:27:51 -05:00
render: fix nanosec "overflow" when calculating timeout value
This commit is contained in:
parent
2d4f0535c6
commit
37218be648
2 changed files with 6 additions and 1 deletions
|
|
@ -82,6 +82,8 @@
|
|||
* Scrollback search matches not being highlighted correctly, on
|
||||
compositors that does now allow Wayland buffer re-use
|
||||
(e.g. KDE/plasma).
|
||||
* Nanosecs "overflow" when calculating timeout value for
|
||||
`resize-delay-ms` option.
|
||||
|
||||
[1173]: https://codeberg.org/dnkl/foot/issues/1173
|
||||
|
||||
|
|
|
|||
5
render.c
5
render.c
|
|
@ -3716,7 +3716,10 @@ send_dimensions_to_client(struct terminal *term)
|
|||
if (fd >= 0) {
|
||||
/* Reset timeout */
|
||||
const struct itimerspec timeout = {
|
||||
.it_value = {.tv_sec = 0, .tv_nsec = delay_ms * 1000000},
|
||||
.it_value = {
|
||||
.tv_sec = delay_ms / 1000,
|
||||
.tv_nsec = (delay_ms % 1000) * 1000000,
|
||||
},
|
||||
};
|
||||
|
||||
if (timerfd_settime(fd, 0, &timeout, NULL) < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue