# window_pane_set_mode

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

```c
int window_pane_set_mode(struct window_pane *wp, struct window_pane *swp, const struct window_mode *mode, struct cmd_find_state *fs, struct args *args)
```

## Parameters

- `wp` (`struct window_pane *`)
- `swp` (`struct window_pane *`)
- `mode` (`const struct window_mode *`)
- `fs` (`struct cmd_find_state *`)
- `args` (`struct args *`)

## Called by

- [`cfg_show_causes`](/en/tmux/3.2a/reference/c-function-cfg_show_causes/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cfg.c#L255)
- [`cmd_choose_tree_exec`](/en/tmux/3.2a/reference/c-function-cmd-choose-tree-c-cmd_choose_tree_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-choose-tree.c#L105)
- [`cmd_copy_mode_exec`](/en/tmux/3.2a/reference/c-function-cmd-copy-mode-c-cmd_copy_mode_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-copy-mode.c#L80)
- [`cmd_find_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-find-window-c-cmd_find_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-find-window.c#L99)
- [`cmd_run_shell_print`](/en/tmux/3.2a/reference/c-function-cmd-run-shell-c-cmd_run_shell_print/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-run-shell.c#L90)
- [`cmdq_print`](/en/tmux/3.2a/reference/c-function-cmdq_print/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-queue.c#L822)

## Calls

- [`notify_pane`](/en/tmux/3.2a/reference/c-function-notify_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L1099)
- [`server_redraw_window_borders`](/en/tmux/3.2a/reference/c-function-server_redraw_window_borders/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L1097)
- [`server_status_window`](/en/tmux/3.2a/reference/c-function-server_status_window/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L1098)
- [`xcalloc`](/en/tmux/3.2a/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L1085)

## Referenced by

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

## Referenced declarations

- [`args`](/en/tmux/3.2a/reference/c-struct-args/) (struct)
- [`cmd_find_state`](/en/tmux/3.2a/reference/c-struct-cmd_find_state/) (struct)
- [`window_mode_entry.entry`](/en/tmux/3.2a/reference/c-struct-window_mode_entry-entry/) (attribute)
- [`window_pane.flags`](/en/tmux/3.2a/reference/c-struct-window_pane-flags/) (attribute)
- [`window_mode.init`](/en/tmux/3.2a/reference/c-struct-window_mode-init/) (attribute)
- [`window_mode_entry.mode`](/en/tmux/3.2a/reference/c-struct-window_mode_entry-mode/) (attribute)
- [`window_pane.modes`](/en/tmux/3.2a/reference/c-struct-window_pane-modes/) (attribute)
- [`PANE_CHANGED`](/en/tmux/3.2a/reference/c-define-tmux-h-pane_changed/) (constant)
- [`PANE_REDRAW`](/en/tmux/3.2a/reference/c-define-tmux-h-pane_redraw/) (constant)
- [`window_mode_entry.prefix`](/en/tmux/3.2a/reference/c-struct-window_mode_entry-prefix/) (attribute)
- [`window_mode_entry.screen`](/en/tmux/3.2a/reference/c-struct-window_mode_entry-screen/) (attribute)
- [`window_pane.screen`](/en/tmux/3.2a/reference/c-struct-window_pane-screen/) (attribute)
- [`window_mode_entry.swp`](/en/tmux/3.2a/reference/c-struct-window_mode_entry-swp/) (attribute)
- [`window_pane.window`](/en/tmux/3.2a/reference/c-struct-window_pane-window/) (attribute)
- [`window_mode`](/en/tmux/3.2a/reference/c-struct-window_mode/) (struct)
- [`window_pane`](/en/tmux/3.2a/reference/c-struct-window_pane/) (struct)
- [`window_mode_entry.wp`](/en/tmux/3.2a/reference/c-struct-window_mode_entry-wp/) (attribute)
