# libtmux::Window::target

- **Module:** libtmux::Window
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/393d4b0ad666f18a6581f1eb281741a75a7503f0/include/libtmux/entities.hpp#L566
- **Page:** https://libtmux.org/en/cxx/latest/reference/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.
