# layout_fix_panes

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

```c
void layout_fix_panes(struct window *w, struct window_pane *skip)
```

## Parameters

- `w` (`struct window *`)
- `skip` (`struct window_pane *`)

## Called by

- [`cmd_resize_pane_mouse_update_floating`](/en/tmux/latest/reference/c-function-cmd-resize-pane-c-cmd_resize_pane_mouse_update_floating/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-resize-pane.c#L294)
- [`cmd_swap_pane_exec`](/en/tmux/latest/reference/c-function-cmd-swap-pane-c-cmd_swap_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-swap-pane.c#L155)
- [`layout_assign_pane`](/en/tmux/latest/reference/c-function-layout_assign_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L833)
- [`layout_close_pane`](/en/tmux/latest/reference/c-function-layout_close_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L1216)
- [`layout_init`](/en/tmux/latest/reference/c-function-layout_init/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L603)
- [`layout_parse`](/en/tmux/latest/reference/c-function-layout_parse/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L285)
- [`layout_resize`](/en/tmux/latest/reference/c-function-layout_resize/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L664)
- [`layout_resize_layout`](/en/tmux/latest/reference/c-function-layout_resize_layout/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L724)
- [`layout_set_even`](/en/tmux/latest/reference/c-function-layout-set-c-layout_set_even/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L185)
- [`layout_set_main_h`](/en/tmux/latest/reference/c-function-layout-set-c-layout_set_main_h/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L299)
- [`layout_set_main_h_mirrored`](/en/tmux/latest/reference/c-function-layout-set-c-layout_set_main_h_mirrored/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L401)
- [`layout_set_main_v`](/en/tmux/latest/reference/c-function-layout-set-c-layout_set_main_v/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L503)
- [`layout_set_main_v_mirrored`](/en/tmux/latest/reference/c-function-layout-set-c-layout_set_main_v_mirrored/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L605)
- [`layout_set_tiled`](/en/tmux/latest/reference/c-function-layout-set-c-layout_set_tiled/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L726)
- [`layout_spread_out`](/en/tmux/latest/reference/c-function-layout_spread_out/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L1299)
- [`options_push_changes`](/en/tmux/latest/reference/c-function-options_push_changes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L1245)
- [`screen_write_alternateoff`](/en/tmux/latest/reference/c-function-screen_write_alternateoff/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2990)
- [`screen_write_alternateon`](/en/tmux/latest/reference/c-function-screen_write_alternateon/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2966)
- [`window_pane_reset_mode`](/en/tmux/latest/reference/c-function-window_pane_reset_mode/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L1288)
- [`window_pane_set_mode`](/en/tmux/latest/reference/c-function-window_pane_set_mode/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L1252)
- [`window_unzoom`](/en/tmux/latest/reference/c-function-window_unzoom/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L767)

## Calls

- [`options_get_number`](/en/tmux/latest/reference/c-function-options_get_number/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L365)
- [`window_pane_is_floating`](/en/tmux/latest/reference/c-function-window_pane_is_floating/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L376)
- [`window_pane_show_scrollbar`](/en/tmux/latest/reference/c-function-window_pane_show_scrollbar/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L383)

## Other function references

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

## Referenced declarations

- [`layout_cell.entry`](/en/tmux/latest/reference/c-struct-layout_cell-entry/) (attribute)
- [`window_pane.flags`](/en/tmux/latest/reference/c-struct-window_pane-flags/) (attribute)
- [`window_pane.layout_cell`](/en/tmux/latest/reference/c-struct-window_pane-layout_cell/) (attribute)
- [`window.options`](/en/tmux/latest/reference/c-struct-window-options/) (attribute)
- [`style.pad`](/en/tmux/latest/reference/c-struct-style-pad/) (attribute)
- [`PANE_MINIMUM`](/en/tmux/latest/reference/c-define-tmux-h-pane_minimum/) (constant)
- [`PANE_REDRAWSCROLLBAR`](/en/tmux/latest/reference/c-define-tmux-h-pane_redrawscrollbar/) (constant)
- [`PANE_SCROLLBARS_LEFT`](/en/tmux/latest/reference/c-define-tmux-h-pane_scrollbars_left/) (constant)
- [`PANE_STATUS_TOP`](/en/tmux/latest/reference/c-define-tmux-h-pane_status_top/) (constant)
- [`window.panes`](/en/tmux/latest/reference/c-struct-window-panes/) (attribute)
- [`window.sb_pos`](/en/tmux/latest/reference/c-struct-window-sb_pos/) (attribute)
- [`window_pane.scrollbar_style`](/en/tmux/latest/reference/c-struct-window_pane-scrollbar_style/) (attribute)
- [`layout_cell.sx`](/en/tmux/latest/reference/c-struct-layout_cell-sx/) (attribute)
- [`layout_cell.sy`](/en/tmux/latest/reference/c-struct-layout_cell-sy/) (attribute)
- [`style.width`](/en/tmux/latest/reference/c-struct-style-width/) (attribute)
- [`window`](/en/tmux/latest/reference/c-struct-window/) (struct)
- [`window_pane`](/en/tmux/latest/reference/c-struct-window_pane/) (struct)
- [`layout_cell.wp`](/en/tmux/latest/reference/c-struct-layout_cell-wp/) (attribute)
- [`layout_cell.xoff`](/en/tmux/latest/reference/c-struct-layout_cell-xoff/) (attribute)
- [`window_pane.xoff`](/en/tmux/latest/reference/c-struct-window_pane-xoff/) (attribute)
- [`layout_cell.yoff`](/en/tmux/latest/reference/c-struct-layout_cell-yoff/) (attribute)
- [`window_pane.yoff`](/en/tmux/latest/reference/c-struct-window_pane-yoff/) (attribute)
