# window_tree_mouse

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1171
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-window-tree-c-window_tree_mouse/

```c
static key_code window_tree_mouse(struct window_tree_modedata *data, key_code key, u_int x, struct window_tree_itemdata *item)
```

## Parameters

- `data` (`struct window_tree_modedata *`)
- `key` (`key_code`)
- `x` (`u_int`)
- `item` (`struct window_tree_itemdata *`)

## Called by

- [`window_tree_key`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1256)

## Calls

- [`mode_tree_expand_current`](/en/tmux/latest/reference/c-function-mode_tree_expand_current/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1203)
- [`mode_tree_set_current`](/en/tmux/latest/reference/c-function-mode_tree_set_current/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1211)
- [`window_tree_pull_item`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_pull_item/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1199)

## Referenced declarations

- [`window_tree_modedata.data`](/en/tmux/latest/reference/c-struct-window_tree_modedata-data/) (attribute)
- [`window_tree_modedata.each`](/en/tmux/latest/reference/c-struct-window_tree_modedata-each/) (attribute)
- [`window_tree_modedata.end`](/en/tmux/latest/reference/c-struct-window_tree_modedata-end/) (attribute)
- [`window_pane.entry`](/en/tmux/latest/reference/c-struct-window_pane-entry/) (attribute)
- [`key_code`](/en/tmux/latest/reference/c-typedef-key_code/) (typealias)
- [`KEYC_MOUSEDOWN1_PANE`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_mousedown1_pane/) (constant)
- [`KEYC_NONE`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_none/) (constant)
- [`window_tree_modedata.left`](/en/tmux/latest/reference/c-struct-window_tree_modedata-left/) (attribute)
- [`window.panes`](/en/tmux/latest/reference/c-struct-window-panes/) (attribute)
- [`window_tree_modedata.right`](/en/tmux/latest/reference/c-struct-window_tree_modedata-right/) (attribute)
- [`window_tree_modedata.start`](/en/tmux/latest/reference/c-struct-window_tree_modedata-start/) (attribute)
- [`window_tree_itemdata.type`](/en/tmux/latest/reference/c-struct-window_tree_itemdata-type/) (attribute)
- [`winlink.window`](/en/tmux/latest/reference/c-struct-winlink-window/) (attribute)
- [`window_tree_itemdata`](/en/tmux/latest/reference/c-struct-window_tree_itemdata/) (struct)
- [`window_tree_modedata`](/en/tmux/latest/reference/c-struct-window_tree_modedata/) (struct)
- [`WINDOW_TREE_SESSION`](/en/tmux/latest/reference/c-enum-window_tree_type-window_tree_session/) (constant)
- [`WINDOW_TREE_WINDOW`](/en/tmux/latest/reference/c-enum-window_tree_type-window_tree_window/) (constant)
- [`session.windows`](/en/tmux/latest/reference/c-struct-session-windows/) (attribute)
