Use any window if no active window is available

This commit is contained in:
Kovid Goyal 2025-07-23 09:48:50 +05:30
parent 85b6ba54dc
commit cac3ac80fc
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -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()