# window_set_active_pane

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

```c
int window_set_active_pane(struct window *w, struct window_pane *wp, int notify)
```

## Parameters

- `w` (`struct window *`)
- `wp` (`struct window_pane *`)
- `notify` (`int`)

## Called by

- [`cmd_attach_session`](/en/tmux/3.2a/reference/c-function-cmd_attach_session/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-attach-session.c#L93)
- [`cmd_join_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-join-pane-c-cmd_join_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-join-pane.c#L157)
- [`cmd_rotate_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-rotate-window-c-cmd_rotate_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-rotate-window.c#L109)
- [`cmd_select_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-select-pane-c-cmd_select_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-select-pane.c#L123)
- [`cmd_swap_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-swap-pane-c-cmd_swap_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-swap-pane.c#L118)
- [`cmd_switch_client_exec`](/en/tmux/3.2a/reference/c-function-cmd-switch-client-c-cmd_switch_client_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-switch-client.c#L124)
- [`spawn_pane`](/en/tmux/3.2a/reference/c-function-spawn_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/spawn.c#L467)
- [`spawn_window`](/en/tmux/3.2a/reference/c-function-spawn_window/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/spawn.c#L116)
- [`window_zoom`](/en/tmux/3.2a/reference/c-function-window_zoom/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L595)

## Calls

- [`log_debug`](/en/tmux/3.2a/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L471)
- [`notify_window`](/en/tmux/3.2a/reference/c-function-notify_window/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L484)
- [`tty_update_window_offset`](/en/tmux/3.2a/reference/c-function-tty_update_window_offset/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L481)

## Referenced by

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

## Referenced declarations

- [`window.active`](/en/tmux/3.2a/reference/c-struct-window-active/) (attribute)
- [`window_pane.active_point`](/en/tmux/3.2a/reference/c-struct-window_pane-active_point/) (attribute)
- [`window_pane.flags`](/en/tmux/3.2a/reference/c-struct-window_pane-flags/) (attribute)
- [`window_pane.id`](/en/tmux/3.2a/reference/c-struct-window_pane-id/) (attribute)
- [`window.last`](/en/tmux/3.2a/reference/c-struct-window-last/) (attribute)
- [`next_active_point`](/en/tmux/3.2a/reference/c-variable-window-c-next_active_point/) (attribute)
- [`PANE_CHANGED`](/en/tmux/3.2a/reference/c-define-tmux-h-pane_changed/) (constant)
- [`window`](/en/tmux/3.2a/reference/c-struct-window/) (struct)
- [`window_pane`](/en/tmux/3.2a/reference/c-struct-window_pane/) (struct)
