# recalculate_size

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/resize.c#L353
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-recalculate_size/

```c
void recalculate_size(struct window *w, int now)
```

## Parameters

- `w` (`struct window *`)
- `now` (`int`)

## Called by

- [`cmd_resize_window_exec`](/en/tmux/3.7c/reference/c-function-cmd-resize-window-c-cmd_resize_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-resize-window.c#L112)
- [`recalculate_sizes_now`](/en/tmux/3.7c/reference/c-function-recalculate_sizes_now/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/resize.c#L459)
- [`server_client_update_latest`](/en/tmux/3.7c/reference/c-function-server-client-c-server_client_update_latest/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1142)

## Calls

- [`clients_calculate_size`](/en/tmux/3.7c/reference/c-function-resize-c-clients_calculate_size/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/resize.c#L375)
- [`log_debug`](/en/tmux/3.7c/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/resize.c#L364)
- [`options_get_number`](/en/tmux/3.7c/reference/c-function-options_get_number/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/resize.c#L371)
- [`resize_window`](/en/tmux/3.7c/reference/c-function-resize_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/resize.c#L407)
- [`tty_update_window_offset`](/en/tmux/3.7c/reference/c-function-tty_update_window_offset/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/resize.c#L396)

## Other function references

- [`recalculate_size_skip_client`](/en/tmux/3.7c/reference/c-function-resize-c-recalculate_size_skip_client/) (function)

## Referenced by

- [`status_prompt_set`](/en/tmux/3.7c/reference/c-function-status_prompt_set/) (function)

## Referenced declarations

- [`window.active`](/en/tmux/3.7c/reference/c-struct-window-active/) (attribute)
- [`window.flags`](/en/tmux/3.7c/reference/c-struct-window-flags/) (attribute)
- [`window.id`](/en/tmux/3.7c/reference/c-struct-window-id/) (attribute)
- [`window.new_sx`](/en/tmux/3.7c/reference/c-struct-window-new_sx/) (attribute)
- [`window.new_sy`](/en/tmux/3.7c/reference/c-struct-window-new_sy/) (attribute)
- [`window.new_xpixel`](/en/tmux/3.7c/reference/c-struct-window-new_xpixel/) (attribute)
- [`window.new_ypixel`](/en/tmux/3.7c/reference/c-struct-window-new_ypixel/) (attribute)
- [`window.options`](/en/tmux/3.7c/reference/c-struct-window-options/) (attribute)
- [`client_window.sx`](/en/tmux/3.7c/reference/c-struct-client_window-sx/) (attribute)
- [`window.sx`](/en/tmux/3.7c/reference/c-struct-window-sx/) (attribute)
- [`client_window.sy`](/en/tmux/3.7c/reference/c-struct-client_window-sy/) (attribute)
- [`window.sy`](/en/tmux/3.7c/reference/c-struct-window-sy/) (attribute)
- [`window`](/en/tmux/3.7c/reference/c-struct-window/) (struct)
- [`WINDOW_RESIZE`](/en/tmux/3.7c/reference/c-define-tmux-h-window_resize/) (constant)
- [`WINDOW_SIZE_MANUAL`](/en/tmux/3.7c/reference/c-define-tmux-h-window_size_manual/) (constant)
