# winlink_set_window

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L181
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-winlink_set_window/

```c
void winlink_set_window(struct winlink *wl, struct window *w)
```

## Parameters

- `wl` (`struct winlink *`)
- `w` (`struct window *`)

## Called by

- [`session_attach`](/en/tmux/3.2a/reference/c-function-session_attach/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L340)
- [`session_group_synchronize1`](/en/tmux/3.2a/reference/c-function-session-c-session_group_synchronize1/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L662)
- [`session_renumber_windows`](/en/tmux/3.2a/reference/c-function-session_renumber_windows/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L713)
- [`spawn_window`](/en/tmux/3.2a/reference/c-function-spawn_window/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/spawn.c#L165)

## Calls

- [`window_add_ref`](/en/tmux/3.2a/reference/c-function-window_add_ref/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L189)
- [`window_remove_ref`](/en/tmux/3.2a/reference/c-function-window_remove_ref/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L185)

## Referenced by

- [`server_client_push_stderr`](/en/tmux/3.2a/reference/c-function-server_client_push_stderr/) (function)

## Referenced declarations

- [`winlink.wentry`](/en/tmux/3.2a/reference/c-struct-winlink-wentry/) (attribute)
- [`window`](/en/tmux/3.2a/reference/c-struct-window/) (struct)
- [`winlink.window`](/en/tmux/3.2a/reference/c-struct-winlink-window/) (attribute)
- [`winlink`](/en/tmux/3.2a/reference/c-struct-winlink/) (struct)
- [`window.winlinks`](/en/tmux/3.2a/reference/c-struct-window-winlinks/) (attribute)
