mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-05-06 06:47:17 -04:00
term/wayland: use MONOTONIC timers
This commit is contained in:
parent
bdc4bf2372
commit
5956faac01
2 changed files with 6 additions and 6 deletions
10
terminal.c
10
terminal.c
|
|
@ -513,20 +513,20 @@ term_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl,
|
||||||
LOG_ERRNO("failed to open PTY");
|
LOG_ERRNO("failed to open PTY");
|
||||||
goto close_fds;
|
goto close_fds;
|
||||||
}
|
}
|
||||||
if ((flash_fd = timerfd_create(CLOCK_BOOTTIME, TFD_CLOEXEC | TFD_NONBLOCK)) == -1) {
|
if ((flash_fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK)) == -1) {
|
||||||
LOG_ERRNO("failed to create flash timer FD");
|
LOG_ERRNO("failed to create flash timer FD");
|
||||||
goto close_fds;
|
goto close_fds;
|
||||||
}
|
}
|
||||||
if ((blink_fd = timerfd_create(CLOCK_BOOTTIME, TFD_CLOEXEC | TFD_NONBLOCK)) == -1) {
|
if ((blink_fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK)) == -1) {
|
||||||
LOG_ERRNO("failed to create blink timer FD");
|
LOG_ERRNO("failed to create blink timer FD");
|
||||||
goto close_fds;
|
goto close_fds;
|
||||||
}
|
}
|
||||||
if ((cursor_blink_fd = timerfd_create(CLOCK_BOOTTIME, TFD_CLOEXEC | TFD_NONBLOCK)) == -1) {
|
if ((cursor_blink_fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK)) == -1) {
|
||||||
LOG_ERRNO("failed to create cursor blink timer FD");
|
LOG_ERRNO("failed to create cursor blink timer FD");
|
||||||
goto close_fds;
|
goto close_fds;
|
||||||
}
|
}
|
||||||
if ((delay_lower_fd = timerfd_create(CLOCK_BOOTTIME, TFD_CLOEXEC | TFD_NONBLOCK)) == -1 ||
|
if ((delay_lower_fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK)) == -1 ||
|
||||||
(delay_upper_fd = timerfd_create(CLOCK_BOOTTIME, TFD_CLOEXEC | TFD_NONBLOCK)) == -1)
|
(delay_upper_fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK)) == -1)
|
||||||
{
|
{
|
||||||
LOG_ERRNO("failed to create delayed rendering timer FDs");
|
LOG_ERRNO("failed to create delayed rendering timer FDs");
|
||||||
goto close_fds;
|
goto close_fds;
|
||||||
|
|
|
||||||
|
|
@ -730,7 +730,7 @@ wayl_init(const struct config *conf, struct fdm *fdm)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
wayl->kbd.repeat.fd = timerfd_create(CLOCK_BOOTTIME, TFD_CLOEXEC | TFD_NONBLOCK);
|
wayl->kbd.repeat.fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
|
||||||
if (wayl->kbd.repeat.fd == -1) {
|
if (wayl->kbd.repeat.fd == -1) {
|
||||||
LOG_ERRNO("failed to create keyboard repeat timer FD");
|
LOG_ERRNO("failed to create keyboard repeat timer FD");
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue