# window_set_name

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L406
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-window_set_name/

```c
void window_set_name(struct window *w, const char *new_name, int untrusted)
```

## Parameters

- `w` (`struct window *`)
- `new_name` (`const char *`)
- `untrusted` (`int`)

## Called by

- [`check_window_name`](/en/tmux/latest/reference/c-function-check_window_name/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/names.c#L98)
- [`cmd_break_pane_exec`](/en/tmux/latest/reference/c-function-cmd-break-pane-c-cmd_break_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-break-pane.c#L89)
- [`cmd_rename_window_exec`](/en/tmux/latest/reference/c-function-cmd-rename-window-c-cmd_rename_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-rename-window.c#L60)
- [`input_exit_rename`](/en/tmux/latest/reference/c-function-input-c-input_exit_rename/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L2825)

## Calls

- [`clean_name`](/en/tmux/latest/reference/c-function-clean_name/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L410)
- [`notify_window`](/en/tmux/latest/reference/c-function-notify_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L414)

## Referenced declarations

- [`window.name`](/en/tmux/latest/reference/c-struct-window-name/) (attribute)
- [`window`](/en/tmux/latest/reference/c-struct-window/) (struct)
