mirror of https://github.com/tmux/tmux.git
Add a window-resized hook which is fired when the window is actually
resized which may be later than the client resize, GitHub issue 2995.pull/3160/head
parent
6a0a783c26
commit
4893edd5d6
|
@ -1245,6 +1245,7 @@ const struct options_table_entry options_table[] = {
|
||||||
OPTIONS_TABLE_HOOK("window-linked", ""),
|
OPTIONS_TABLE_HOOK("window-linked", ""),
|
||||||
OPTIONS_TABLE_WINDOW_HOOK("window-pane-changed", ""),
|
OPTIONS_TABLE_WINDOW_HOOK("window-pane-changed", ""),
|
||||||
OPTIONS_TABLE_WINDOW_HOOK("window-renamed", ""),
|
OPTIONS_TABLE_WINDOW_HOOK("window-renamed", ""),
|
||||||
|
OPTIONS_TABLE_WINDOW_HOOK("window-resized", ""),
|
||||||
OPTIONS_TABLE_HOOK("window-unlinked", ""),
|
OPTIONS_TABLE_HOOK("window-unlinked", ""),
|
||||||
|
|
||||||
{ .name = NULL }
|
{ .name = NULL }
|
||||||
|
|
1
resize.c
1
resize.c
|
@ -61,6 +61,7 @@ resize_window(struct window *w, u_int sx, u_int sy, int xpixel, int ypixel)
|
||||||
tty_update_window_offset(w);
|
tty_update_window_offset(w);
|
||||||
server_redraw_window(w);
|
server_redraw_window(w);
|
||||||
notify_window("window-layout-changed", w);
|
notify_window("window-layout-changed", w);
|
||||||
|
notify_window("window-resized", w);
|
||||||
w->flags &= ~WINDOW_RESIZE;
|
w->flags &= ~WINDOW_RESIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue