From 1a7291276c714a82de89a0faa74ae773ece57bb3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 1 Apr 2021 22:07:37 +0530 Subject: [PATCH] Add a cat face emoji at the start of the CSD title --- kitty/glfw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kitty/glfw.c b/kitty/glfw.c index 2faf0319b..09b3dcb3c 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -411,7 +411,9 @@ draw_text_callback(GLFWwindow *window, const char *text, uint32_t fg, uint32_t b get_window_dpi(window, &xdpi, &ydpi); unsigned px_sz = (unsigned)(global_state.callback_os_window->font_sz_in_pts * ydpi / 72.); px_sz = MIN(px_sz, 3 * height / 4); - bool ok = render_single_line(csd_title_render_ctx, text, px_sz, fg, bg, output_buf, width, height, x_offset, y_offset); + static char title[2048]; + snprintf(title, sizeof(title), "🐱 %s", text); + bool ok = render_single_line(csd_title_render_ctx, title, px_sz, fg, bg, output_buf, width, height, x_offset, y_offset); if (!ok && PyErr_Occurred()) PyErr_Print(); return ok; }