# tty_update_mode

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L658
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-tty_update_mode/

```c
void tty_update_mode(struct tty *tty, int mode, struct screen *s)
```

## Parameters

- `tty` (`struct tty *`)
- `mode` (`int`)
- `s` (`struct screen *`)

## Called by

- [`screen_redraw_pane`](/en/tmux/3.2a/reference/c-function-screen_redraw_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-redraw.c#L644)
- [`screen_redraw_screen`](/en/tmux/3.2a/reference/c-function-screen_redraw_screen/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-redraw.c#L608)
- [`server_client_check_redraw`](/en/tmux/3.2a/reference/c-function-server-client-c-server_client_check_redraw/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L1974)
- [`server_client_reset_state`](/en/tmux/3.2a/reference/c-function-server-client-c-server_client_reset_state/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L1741)
- [`tty_draw_line`](/en/tmux/3.2a/reference/c-function-tty_draw_line/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1305)

## Calls

- [`log_debug`](/en/tmux/3.2a/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L671)
- [`tty_force_cursor_colour`](/en/tmux/3.2a/reference/c-function-tty-c-tty_force_cursor_colour/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L664)
- [`tty_putcode`](/en/tmux/3.2a/reference/c-function-tty_putcode/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L680)
- [`tty_putcode1`](/en/tmux/3.2a/reference/c-function-tty_putcode1/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L682)
- [`tty_puts`](/en/tmux/3.2a/reference/c-function-tty_puts/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L715)
- [`tty_term_has`](/en/tmux/3.2a/reference/c-function-tty_term_has/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L678)

## Referenced by

- [`tty_invalidate`](/en/tmux/3.2a/reference/c-function-tty-c-tty_invalidate/) (function)

## Referenced declarations

- [`ALL_MOUSE_MODES`](/en/tmux/3.2a/reference/c-define-tmux-h-all_mouse_modes/) (constant)
- [`screen.ccolour`](/en/tmux/3.2a/reference/c-struct-screen-ccolour/) (attribute)
- [`tty.ccolour`](/en/tmux/3.2a/reference/c-struct-tty-ccolour/) (attribute)
- [`tty.client`](/en/tmux/3.2a/reference/c-struct-tty-client/) (attribute)
- [`screen.cstyle`](/en/tmux/3.2a/reference/c-struct-screen-cstyle/) (attribute)
- [`tty.cstyle`](/en/tmux/3.2a/reference/c-struct-tty-cstyle/) (attribute)
- [`tty.flags`](/en/tmux/3.2a/reference/c-struct-tty-flags/) (attribute)
- [`tty.mode`](/en/tmux/3.2a/reference/c-struct-tty-mode/) (attribute)
- [`MODE_BLINKING`](/en/tmux/3.2a/reference/c-define-tmux-h-mode_blinking/) (constant)
- [`MODE_BRACKETPASTE`](/en/tmux/3.2a/reference/c-define-tmux-h-mode_bracketpaste/) (constant)
- [`MODE_CURSOR`](/en/tmux/3.2a/reference/c-define-tmux-h-mode_cursor/) (constant)
- [`MODE_MOUSE_ALL`](/en/tmux/3.2a/reference/c-define-tmux-h-mode_mouse_all/) (constant)
- [`MODE_MOUSE_BUTTON`](/en/tmux/3.2a/reference/c-define-tmux-h-mode_mouse_button/) (constant)
- [`MODE_MOUSE_SGR`](/en/tmux/3.2a/reference/c-define-tmux-h-mode_mouse_sgr/) (constant)
- [`MODE_MOUSE_STANDARD`](/en/tmux/3.2a/reference/c-define-tmux-h-mode_mouse_standard/) (constant)
- [`client.name`](/en/tmux/3.2a/reference/c-struct-client-name/) (attribute)
- [`screen`](/en/tmux/3.2a/reference/c-struct-screen/) (struct)
- [`tty.term`](/en/tmux/3.2a/reference/c-struct-tty-term/) (attribute)
- [`tty`](/en/tmux/3.2a/reference/c-struct-tty/) (struct)
- [`TTY_NOCURSOR`](/en/tmux/3.2a/reference/c-define-tmux-h-tty_nocursor/) (constant)
- [`TTYC_CIVIS`](/en/tmux/3.2a/reference/c-enum-tty_code_code-ttyc_civis/) (constant)
- [`TTYC_CNORM`](/en/tmux/3.2a/reference/c-enum-tty_code_code-ttyc_cnorm/) (constant)
- [`TTYC_CVVIS`](/en/tmux/3.2a/reference/c-enum-tty_code_code-ttyc_cvvis/) (constant)
- [`TTYC_DSBP`](/en/tmux/3.2a/reference/c-enum-tty_code_code-ttyc_dsbp/) (constant)
- [`TTYC_ENBP`](/en/tmux/3.2a/reference/c-enum-tty_code_code-ttyc_enbp/) (constant)
- [`TTYC_KMOUS`](/en/tmux/3.2a/reference/c-enum-tty_code_code-ttyc_kmous/) (constant)
- [`TTYC_SE`](/en/tmux/3.2a/reference/c-enum-tty_code_code-ttyc_se/) (constant)
- [`TTYC_SS`](/en/tmux/3.2a/reference/c-enum-tty_code_code-ttyc_ss/) (constant)
