# window_pane_set_mode

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L1223
- **Page:** https://libtmux.org/en/tmux/latest/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/latest/reference/c-function-cfg_show_causes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L271)
- [`cmd_choose_tree_exec`](/en/tmux/latest/reference/c-function-cmd-choose-tree-c-cmd_choose_tree_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-choose-tree.c#L122)
- [`cmd_copy_mode_exec`](/en/tmux/latest/reference/c-function-cmd-copy-mode-c-cmd_copy_mode_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-copy-mode.c#L82)
- [`cmd_find_window_exec`](/en/tmux/latest/reference/c-function-cmd-find-window-c-cmd_find_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-find-window.c#L112)
- [`cmd_run_shell_print`](/en/tmux/latest/reference/c-function-cmd-run-shell-c-cmd_run_shell_print/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L103)
- [`server_client_print`](/en/tmux/latest/reference/c-function-server_client_print/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L2848)

## Calls

- [`layout_fix_panes`](/en/tmux/latest/reference/c-function-layout_fix_panes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L1252)
- [`notify_pane`](/en/tmux/latest/reference/c-function-notify_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L1256)
- [`server_redraw_window_borders`](/en/tmux/latest/reference/c-function-server_redraw_window_borders/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L1254)
- [`server_status_window`](/en/tmux/latest/reference/c-function-server_status_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L1255)
- [`xcalloc`](/en/tmux/latest/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L1241)

## Referenced declarations

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