From cac3ac80fc6e4b748c69d6f709876bcff7329cc9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 23 Jul 2025 09:48:50 +0530 Subject: [PATCH] Use any window if no active window is available --- kitty/tabs.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kitty/tabs.py b/kitty/tabs.py index b35434fcb..4b40f145e 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -1004,10 +1004,17 @@ def tabbar_visibility_changed(self) -> None: self.tab_bar.layout() self.resize(only_tabs=True) + @property + def any_window(self) -> Window | None: + for t in self: + for w in t: + return w + return None + def mark_tab_bar_dirty(self) -> None: if self.tab_bar_should_be_visible and not self.tab_bar_hidden: mark_tab_bar_dirty(self.os_window_id) - w = self.active_window + w = self.active_window or self.any_window if w is not None: data = {'tab_manager': self} boss = get_boss()