# window_pane_stack_remove

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

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

## Parameters

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

## Called by

- [`cmd_swap_pane_exec`](/en/tmux/3.7c/reference/c-function-cmd-swap-pane-c-cmd_swap_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-swap-pane.c#L151)
- [`window_destroy_panes`](/en/tmux/3.7c/reference/c-function-window_destroy_panes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L960)
- [`window_lost_pane`](/en/tmux/3.7c/reference/c-function-window_lost_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L839)
- [`window_pane_stack_push`](/en/tmux/3.7c/reference/c-function-window_pane_stack_push/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L1727)
- [`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#L550)

## 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)
