# tty_update_mode

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L859
- **Page:** https://libtmux.org/en/tmux/latest/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/latest/reference/c-function-screen_redraw_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-redraw.c#L857)
- [`screen_redraw_screen`](/en/tmux/latest/reference/c-function-screen_redraw_screen/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-redraw.c#L818)
- [`server_client_check_redraw`](/en/tmux/latest/reference/c-function-server-client-c-server_client_check_redraw/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L2125)
- [`server_client_reset_state`](/en/tmux/latest/reference/c-function-server-client-c-server_client_reset_state/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1861)
- [`tty_draw_line`](/en/tmux/latest/reference/c-function-tty_draw_line/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-draw.c#L139)

## Calls

- [`log_debug`](/en/tmux/latest/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L875)
- [`log_get_level`](/en/tmux/latest/reference/c-function-log_get_level/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L874)
- [`tty_puts`](/en/tmux/latest/reference/c-function-tty_puts/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L887)

## Other function references

- [`screen_mode_to_string`](/en/tmux/latest/reference/c-function-screen_mode_to_string/) (function)
- [`tty_term_has`](/en/tmux/latest/reference/c-function-tty_term_has/) (function)
- [`tty_update_cursor`](/en/tmux/latest/reference/c-function-tty-c-tty_update_cursor/) (function)

## Referenced by

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

## Referenced declarations

- [`ALL_MOUSE_MODES`](/en/tmux/latest/reference/c-define-tmux-h-all_mouse_modes/) (constant)
- [`tty.client`](/en/tmux/latest/reference/c-struct-tty-client/) (attribute)
- [`tty.flags`](/en/tmux/latest/reference/c-struct-tty-flags/) (attribute)
- [`tty.mode`](/en/tmux/latest/reference/c-struct-tty-mode/) (attribute)
- [`MODE_CURSOR`](/en/tmux/latest/reference/c-define-tmux-h-mode_cursor/) (constant)
- [`MODE_CURSOR_BLINKING`](/en/tmux/latest/reference/c-define-tmux-h-mode_cursor_blinking/) (constant)
- [`MODE_MOUSE_ALL`](/en/tmux/latest/reference/c-define-tmux-h-mode_mouse_all/) (constant)
- [`MODE_MOUSE_BUTTON`](/en/tmux/latest/reference/c-define-tmux-h-mode_mouse_button/) (constant)
- [`MODE_MOUSE_STANDARD`](/en/tmux/latest/reference/c-define-tmux-h-mode_mouse_standard/) (constant)
- [`client.name`](/en/tmux/latest/reference/c-struct-client-name/) (attribute)
- [`screen`](/en/tmux/latest/reference/c-struct-screen/) (struct)
- [`tty.term`](/en/tmux/latest/reference/c-struct-tty-term/) (attribute)
- [`tty`](/en/tmux/latest/reference/c-struct-tty/) (struct)
- [`TTY_NOCURSOR`](/en/tmux/latest/reference/c-define-tmux-h-tty_nocursor/) (constant)
- [`TTYC_KMOUS`](/en/tmux/latest/reference/c-enum-tty_code_code-ttyc_kmous/) (constant)
