# session.Session.active_window

- **Module:** session.Session
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/session.rs#L446
- **Page:** https://libtmux.org/reference/rs/session-session-active_window/

```
session.Session.active_window(self) -> Result<Option<Window>, Error>
```

Return the session's active window.

# Errors

Returns an error when the window listing fails. A session always has an
active window, so `Ok(None)` means the session disappeared between the
snapshot and this call.
