mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-16 22:05:21 -05:00
term: drop term->render.title.is_armed
This boolean isn't needed. The idea was probably to not re-program the timer unnecessarily, or even to prevent it from being moved forward in time indefinitely. However, the logic has (probably) gone through some changes, that now makes it irrelevant. The timer isn't moved forward indefinitely; it is always set to 8ms from the last title update. The closer we get to that point in time, the smaller the timeout we set. Now, is_armed _did_ prevent the timer from being re-programmed. But that tiny performance tweak isn't really necessary, as the title should, in normal cases, not be set that often anyway.
This commit is contained in:
parent
41dc259744
commit
4801d3a305
3 changed files with 0 additions and 6 deletions
3
render.c
3
render.c
|
|
@ -4508,9 +4508,6 @@ fdm_hook_refresh_pending_terminals(struct fdm *fdm, void *data)
|
|||
void
|
||||
render_refresh_title(struct terminal *term)
|
||||
{
|
||||
if (term->render.title.is_armed)
|
||||
return;
|
||||
|
||||
struct timespec now;
|
||||
if (clock_gettime(CLOCK_MONOTONIC, &now) < 0)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -622,7 +622,6 @@ fdm_title_update_timeout(struct fdm *fdm, int fd, int events, void *data)
|
|||
|
||||
struct itimerspec reset = {{0}};
|
||||
timerfd_settime(term->render.title.timer_fd, 0, &reset, NULL);
|
||||
term->render.title.is_armed = false;
|
||||
|
||||
render_refresh_title(term);
|
||||
return true;
|
||||
|
|
@ -1209,7 +1208,6 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper,
|
|||
.scrollback_lines = conf->scrollback.lines,
|
||||
.app_sync_updates.timer_fd = app_sync_updates_fd,
|
||||
.title = {
|
||||
.is_armed = false,
|
||||
.timer_fd = title_update_fd,
|
||||
},
|
||||
.workers = {
|
||||
|
|
|
|||
|
|
@ -603,7 +603,6 @@ struct terminal {
|
|||
|
||||
struct {
|
||||
struct timespec last_update;
|
||||
bool is_armed;
|
||||
int timer_fd;
|
||||
} title;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue