# clients_calculate_size

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

```c
static int clients_calculate_size(int type, int current, struct client *c, struct session *s, struct window *w, int(*skip_client)(struct client *, int, int, struct session *, struct window *), u_int *sx, u_int *sy, u_int *xpixel, u_int *ypixel)
```

## Parameters

- `type` (`int`)
- `current` (`int`)
- `c` (`struct client *`)
- `s` (`struct session *`)
- `w` (`struct window *`)
- `skip_client` (`int(*)(struct client *, int, int, struct session *, struct window *)`)
- `sx` (`u_int *`)
- `sy` (`u_int *`)
- `xpixel` (`u_int *`)
- `ypixel` (`u_int *`)

## Called by

- [`default_window_size`](/en/tmux/3.2a/reference/c-function-default_window_size/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/resize.c#L250)
- [`recalculate_size`](/en/tmux/3.2a/reference/c-function-recalculate_size/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/resize.c#L311)

## Calls

- [`clients_with_window`](/en/tmux/3.2a/reference/c-function-resize-c-clients_with_window/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/resize.c#L140)
- [`log_debug`](/en/tmux/3.2a/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/resize.c#L121)

## Other function references

- [`ignore_client_size`](/en/tmux/3.2a/reference/c-function-resize-c-ignore_client_size/) (function)
- [`status_line_size`](/en/tmux/3.2a/reference/c-function-status_line_size/) (function)

## Referenced declarations

- [`client`](/en/tmux/3.2a/reference/c-struct-client/) (struct)
- [`client.entry`](/en/tmux/3.2a/reference/c-struct-client-entry/) (attribute)
- [`window.latest`](/en/tmux/3.2a/reference/c-struct-window-latest/) (attribute)
- [`client.name`](/en/tmux/3.2a/reference/c-struct-client-name/) (attribute)
- [`session`](/en/tmux/3.2a/reference/c-struct-session/) (struct)
- [`tty.sx`](/en/tmux/3.2a/reference/c-struct-tty-sx/) (attribute)
- [`tty.sy`](/en/tmux/3.2a/reference/c-struct-tty-sy/) (attribute)
- [`client.tty`](/en/tmux/3.2a/reference/c-struct-client-tty/) (attribute)
- [`window`](/en/tmux/3.2a/reference/c-struct-window/) (struct)
- [`WINDOW_SIZE_LARGEST`](/en/tmux/3.2a/reference/c-define-tmux-h-window_size_largest/) (constant)
- [`WINDOW_SIZE_LATEST`](/en/tmux/3.2a/reference/c-define-tmux-h-window_size_latest/) (constant)
- [`WINDOW_SIZE_MANUAL`](/en/tmux/3.2a/reference/c-define-tmux-h-window_size_manual/) (constant)
- [`tty.xpixel`](/en/tmux/3.2a/reference/c-struct-tty-xpixel/) (attribute)
- [`tty.ypixel`](/en/tmux/3.2a/reference/c-struct-tty-ypixel/) (attribute)
