# window-pane-changed

Source: https://libtmux.org/en/tmux/3.7c/catalog/hooks/window-pane-changed/

> The active pane in the window with ID window-id changed to the pane with ID pane-id.

hook tmux3.7c

The active pane in the window with ID window-id changed to the pane with ID pane-id.

* Scope

  window

* Set

  [`set-hook`](https://libtmux.org/en/tmux/3.7c/manual/set-hook/) `window-pane-changed command`

* Read

  [`show-hooks`](https://libtmux.org/en/tmux/3.7c/manual/show-hooks/) `window-pane-changed`

* Control mode

  Also sent to control clients as `%window-pane-changed`

## Description[#](https://libtmux.org/en/tmux/3.7c/catalog/hooks/window-pane-changed/#description)

The active pane in the window with ID `window-id` changed to the pane with ID `pane-id`.

This text describes the control mode notification `%window-pane-changed`, which tmux sends when this hook fires.

## Releases[#](https://libtmux.org/en/tmux/3.7c/catalog/hooks/window-pane-changed/#releases)

* [tmux 3.7c](https://libtmux.org/en/tmux/3.7c/catalog/hooks/window-pane-changed/) : present
* [tmux 3.2a](https://libtmux.org/en/tmux/3.2a/catalog/hooks/window-pane-changed/) : present

## Source[#](https://libtmux.org/en/tmux/3.7c/catalog/hooks/window-pane-changed/#source)

* Defined in

  [`options-table.c:1707`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options-table.c#L1707)

* Fired from

  * [`window.c:566`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L566) in `notify_window`
  * [`window.c:850`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L850) in `notify_window`

* C source reference

  [`options_table`](https://libtmux.org/en/tmux/3.7c/reference/c-variable-options_table/), [`notify_window`](https://libtmux.org/en/tmux/3.7c/reference/c-function-notify_window/)

* CLI Manual

  [Original manual entry](https://libtmux.org/en/tmux/3.7c/manual/full/#control-mode-window-pane-changed)

## Used by[#](https://libtmux.org/en/tmux/3.7c/catalog/hooks/window-pane-changed/#used-by)

Library documentation that names this hook.

* Go

  [`tmux.WindowHookValues.WindowPaneChanged`](https://libtmux.org/en/go/latest/reference/tmux-windowhookvalues-windowpanechanged/)
