def test() -> bool: # Consider focused when any window inside this container is # focused. current_window = get_app().layout.current_window for c in walk(cast(Container, value)): if isinstance(c, Window) and c == current_window: return True return False
def test(): # Consider focused when any window inside this container is # focused. current_window = get_app().layout.current_window for c in walk(value): if isinstance(c, Window) and c == current_window: return True return False