diff options
author | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-02-06 13:50:37 +0200 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-02-19 15:00:17 +0200 |
commit | 4d012bc191c3a6466de6c4e7ec23e3267becb4fc (patch) | |
tree | 40af4ddca41ae5c33c32ae4f9268695251c4f6c9 /clients/presentation-shm.c | |
parent | 1879f21c85bd9db9377d9cb3a65cf0815c7b6cc1 (diff) | |
download | weston-4d012bc191c3a6466de6c4e7ec23e3267becb4fc.tar.gz |
presentation-shm: put run mode in window title
This way JSON timeline logs will contain the information about in which
mode the program runs.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'clients/presentation-shm.c')
-rw-r--r-- | clients/presentation-shm.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/clients/presentation-shm.c b/clients/presentation-shm.c index 4cbd0934..e791b2be 100644 --- a/clients/presentation-shm.c +++ b/clients/presentation-shm.c @@ -46,6 +46,12 @@ enum run_mode { RUN_MODE_PRESENT, }; +static const char * const run_mode_name[] = { + [RUN_MODE_FEEDBACK] = "feedback", + [RUN_MODE_FEEDBACK_IDLE] = "feedback-idle", + [RUN_MODE_PRESENT] = "low-lat present", +}; + struct output { struct wl_output *output; uint32_t name; @@ -198,8 +204,12 @@ create_window(struct display *display, int width, int height, enum run_mode mode) { struct window *window; + char title[128]; int ret; + snprintf(title, sizeof(title), + "presentation-shm: %s", run_mode_name[mode]); + window = calloc(1, sizeof *window); if (!window) return NULL; @@ -218,7 +228,7 @@ create_window(struct display *display, int width, int height, wl_shell_surface_add_listener(window->shell_surface, &shell_surface_listener, window); - wl_shell_surface_set_title(window->shell_surface, "presentation-shm"); + wl_shell_surface_set_title(window->shell_surface, title); wl_shell_surface_set_toplevel(window->shell_surface); |