# cmd_mouse_window

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd.c#L793
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-cmd_mouse_window/

```c
struct winlink * cmd_mouse_window(struct mouse_event *m, struct session **sp)
```

## Parameters

- `m` (`struct mouse_event *`)
- `sp` (`struct session **`)

## Called by

- [`cmd_find_target`](/en/tmux/latest/reference/c-function-cmd_find_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-find.c#L1021)
- [`cmd_resize_pane_mouse_update_tiled`](/en/tmux/latest/reference/c-function-cmd-resize-pane-c-cmd_resize_pane_mouse_update_tiled/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-resize-pane.c#L313)

## Calls

- [`winlink_find_by_window`](/en/tmux/latest/reference/c-function-winlink_find_by_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd.c#L808)

## Other function references

- [`session_find_by_id`](/en/tmux/latest/reference/c-function-session_find_by_id/) (function)
- [`window_find_by_id`](/en/tmux/latest/reference/c-function-window_find_by_id/) (function)

## Referenced by

- [`cmd_mouse_pane`](/en/tmux/latest/reference/c-function-cmd_mouse_pane/) (function)

## Referenced declarations

- [`session.curw`](/en/tmux/latest/reference/c-struct-session-curw/) (attribute)
- [`mouse_event`](/en/tmux/latest/reference/c-struct-mouse_event/) (struct)
- [`mouse_event.s`](/en/tmux/latest/reference/c-struct-mouse_event-s/) (attribute)
- [`session`](/en/tmux/latest/reference/c-struct-session/) (struct)
- [`mouse_event.valid`](/en/tmux/latest/reference/c-struct-mouse_event-valid/) (attribute)
- [`mouse_event.w`](/en/tmux/latest/reference/c-struct-mouse_event-w/) (attribute)
- [`session.windows`](/en/tmux/latest/reference/c-struct-session-windows/) (attribute)
- [`winlink`](/en/tmux/latest/reference/c-struct-winlink/) (struct)
