render: don’t create/destroy the title update timer each time

Create it once when instantiating the terminal. Add a boolean to track
whether the timer is running or not.
This commit is contained in:
Daniel Eklöf 2021-06-18 15:53:47 +02:00
parent 535c82d628
commit 07b455e882
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 45 additions and 37 deletions

View file

@ -490,6 +490,7 @@ struct terminal {
struct {
struct timeval last_update;
bool is_armed;
int timer_fd;
} title;