# libtmux::Window::target

- **Module:** libtmux::Window
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/85e8bd603a322dc32bb8b9aeb1a72bcf36945f1d/include/libtmux/entities.hpp#L466
- **Page:** https://libtmux.org/reference/cxx/libtmux-window-target/

```
libtmux::Window::target() -> std::string
```

How to address this window, and the reason a window id alone will not do.

The same window can be linked into several sessions, and a bare `@id` leaves tmux to pick one of those homes: the index it reports, the session it names, and the link a move or a kill lands on then depend on a choice the caller did not make. Qualifying by the session this window was listed from names one link.

Prefer `checked_target()`; this source-compatible form returns an empty string when psmux cannot bind a reusable target without a stale race.
