# winlink_set_window

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L184
- **Page:** https://libtmux.org/en/tmux/3.7c/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.7c/reference/c-function-session_attach/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L332)
- [`session_group_synchronize1`](/en/tmux/3.7c/reference/c-function-session-c-session_group_synchronize1/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L659)
- [`session_renumber_windows`](/en/tmux/3.7c/reference/c-function-session_renumber_windows/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L712)
- [`spawn_window`](/en/tmux/3.7c/reference/c-function-spawn_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/spawn.c#L164)

## Calls

- [`window_add_ref`](/en/tmux/3.7c/reference/c-function-window_add_ref/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L192)
- [`window_remove_ref`](/en/tmux/3.7c/reference/c-function-window_remove_ref/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L188)

## Referenced declarations

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