# window_pane_stack_push

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

```c
void window_pane_stack_push(struct window_panes *stack, struct window_pane *wp)
```

## Parameters

- `stack` (`struct window_panes *`)
- `wp` (`struct window_pane *`)

## Called by

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

## Calls

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

## Referenced declarations

- [`window_pane.flags`](/en/tmux/3.7c/reference/c-struct-window_pane-flags/) (attribute)
- [`PANE_VISITED`](/en/tmux/3.7c/reference/c-define-tmux-h-pane_visited/) (constant)
- [`window_pane.sentry`](/en/tmux/3.7c/reference/c-struct-window_pane-sentry/) (attribute)
- [`window_pane`](/en/tmux/3.7c/reference/c-struct-window_pane/) (struct)
- [`window_panes`](/en/tmux/3.7c/reference/c-struct-window_panes/) (struct)
