Add a couple more states to match against

So we can now select windows/tabs that are not active/focused but are in
the active/focused tab/os window.
This commit is contained in:
Kovid Goyal
2022-04-12 20:35:31 +05:30
parent f15ce21da1
commit 2c72c56e22
3 changed files with 12 additions and 2 deletions

View File

@@ -717,6 +717,10 @@ class Tab: # {{{
for w in self:
if w.needs_attention:
return True
if query == 'parent_active':
return active_tab_manager is not None and self.tab_manager_ref() is active_tab_manager
if query == 'parent_focused':
return active_tab_manager is not None and self.tab_manager_ref() is active_tab_manager and self.os_window_id == current_os_window()
return False
return False