From 4feb167e99f13e8e690c9593fc1fe53a4b756826 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 3 Jul 2026 11:08:14 +0530 Subject: [PATCH] Cleanup previous PR --- kitty/fast_data_types.pyi | 2 +- kitty/state.c | 2 +- kitty/tab_bar.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kitty/fast_data_types.pyi b/kitty/fast_data_types.pyi index a0e9c8f3e..656fe5cb4 100644 --- a/kitty/fast_data_types.pyi +++ b/kitty/fast_data_types.pyi @@ -1775,7 +1775,7 @@ def layer_shell_config_for_os_window(os_window_id: int) -> dict[str, Any] | None def set_layer_shell_config(os_window_id: int, cfg: LayerShellConfig) -> bool: ... def wrapped_kitten_names() -> List[str]: ... def expand_ansi_c_escapes(test: str) -> str: ... -def update_tab_bar_edge_colors(os_window_id: int) -> bool: ... +def update_tab_bar_edge_colors(os_window_id: int, is_vertical: bool = False) -> tuple[bool, bool] | None: ... def mask_kitty_signals_process_wide() -> None: ... def is_modifier_key(key: int) -> bool: ... def base64_encode(src: Union[str, ReadableBuffer], add_padding: bool = False) -> bytes: ... diff --git a/kitty/state.c b/kitty/state.c index fd478baf9..360277b7a 100644 --- a/kitty/state.c +++ b/kitty/state.c @@ -1405,7 +1405,7 @@ PYWRAP1(patch_global_colors) { PYWRAP1(update_tab_bar_edge_colors) { id_type os_window_id; int is_vertical = 0; - PA("K|i", &os_window_id, &is_vertical); + PA("K|p", &os_window_id, &is_vertical); WITH_OS_WINDOW(os_window_id) Screen *screen = os_window->tab_bar_render_data.screen; if (screen) { diff --git a/kitty/tab_bar.py b/kitty/tab_bar.py index 1d15a3876..55f96c507 100644 --- a/kitty/tab_bar.py +++ b/kitty/tab_bar.py @@ -824,9 +824,9 @@ class TabBar: set_tab_bar_render_data(self.os_window_id, self.screen, *g[:4]) def _update_edge_defaults(self, is_vertical: bool) -> bool: - """Call update_tab_bar_edge_colors, update cached is-default flags. - Returns True when the flags changed and blank_rects need rebuilding.""" - result = update_tab_bar_edge_colors(self.os_window_id, int(is_vertical)) + '''Call update_tab_bar_edge_colors, update cached is-default flags. + Returns True when the flags changed and blank_rects need rebuilding.''' + result = update_tab_bar_edge_colors(self.os_window_id, is_vertical) if result is None: return False left_is_default, right_is_default = result