mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-29 07:58:01 -04: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
|
* Scrollback search matches not being highlighted correctly, on
|
||||||
compositors that does now allow Wayland buffer re-use
|
compositors that does now allow Wayland buffer re-use
|
||||||
(e.g. KDE/plasma).
|
(e.g. KDE/plasma).
|
||||||
|
* Nanosecs "overflow" when calculating timeout value for
|
||||||
|
`resize-delay-ms` option.
|
||||||
|
|
||||||
[1173]: https://codeberg.org/dnkl/foot/issues/1173
|
[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) {
|
if (fd >= 0) {
|
||||||
/* Reset timeout */
|
/* Reset timeout */
|
||||||
const struct itimerspec 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) {
|
if (timerfd_settime(fd, 0, &timeout, NULL) < 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue