diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-11-01 22:49:54 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-11-01 22:49:54 +0000 |
| commit | 25311fc4eb278d41cb29e1d0dd8dccff07617713 (patch) | |
| tree | 0f72cc86b04b5e3ac0e9429f386d227151b79406 /render.c | |
| parent | Merge branch 'term-init-cleanup' (diff) | |
| parent | client: register signal handler for SIGTERM too (diff) | |
Merge branch 'multi-window'
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -693,6 +693,7 @@ grid_render(struct terminal *term) if (all_clean) { buf->busy = false; + wl_display_flush(term->wl->display); return; } @@ -727,6 +728,7 @@ grid_render(struct terminal *term) LOG_INFO("frame rendered in %lds %ldus", render_time.tv_sec, render_time.tv_usec); #endif + wl_display_flush(term->wl->display); } static void @@ -948,9 +950,21 @@ render_resize(struct terminal *term, int width, int height) } void -render_set_title(struct terminal *term, const char *title) +render_set_title(struct terminal *term, const char *_title) { + /* TODO: figure out what the limit actually is */ + static const size_t max_len = 100; + + const char *title = _title; + char *copy = NULL; + + if (strlen(title) > max_len) { + copy = strndup(_title, max_len); + title = copy; + } + xdg_toplevel_set_title(term->window->xdg_toplevel, title); + free(copy); } void |
