From 62bd6c88e99a82bedeece3c8bca15dab4b629098 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 1 Aug 2024 12:37:04 +0530 Subject: [PATCH] Wayland GNOME: Fix the font size in the OS Window title bar changing with the size of the text in the window --- docs/changelog.rst | 2 ++ kitty/glfw.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 0c54eb721..9e882f38f 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -130,6 +130,8 @@ Detailed list of changes - diff kitten: Add bindings to jump to next and previous file (:pull:`7683`) +- Wayland GNOME: Fix the font size in the OS Window title bar changing with the size of the text in the window (:disc:`7677`) + 0.35.2 [2024-06-22] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/glfw.c b/kitty/glfw.c index f44f7fc86..4fd8d3e5c 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -642,8 +642,7 @@ draw_text_callback(GLFWwindow *window, const char *text, uint32_t fg, uint32_t b if (!ensure_csd_title_render_ctx()) return false; double xdpi, ydpi; get_window_dpi(window, &xdpi, &ydpi); - unsigned px_sz = (unsigned)(global_state.callback_os_window->fonts_data->font_sz_in_pts * ydpi / 72.); - px_sz = MIN(px_sz, 3 * height / 4); + unsigned px_sz = 2 * height / 3; static char title[2048]; if (!is_single_glyph) { snprintf(title, sizeof(title), " ❭ %s", text);