term: group 'flash' state together in a struct

This commit is contained in:
Daniel Eklöf 2019-07-22 19:15:56 +02:00
parent 61409d40e2
commit 196f9d67c2
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 18 additions and 14 deletions

4
osc.c
View file

@ -213,10 +213,10 @@ osc_flash(struct terminal *term)
.it_value = {.tv_sec = 0, .tv_nsec = duration_ms * 1000000},
};
if (timerfd_settime(term->flash_timer_fd, 0, &alarm, NULL) < 0)
if (timerfd_settime(term->flash.fd, 0, &alarm, NULL) < 0)
LOG_ERRNO("failed to arm flash timer");
else {
term->flash_active = true;
term->flash.active = true;
}
}