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/3079/head
nicm 2022-02-17 09:58:47 +00:00
parent 0027ee13a0
commit 818b2176ef
2 changed files with 2 additions and 0 deletions

View File

@ -1246,6 +1246,7 @@ const struct options_table_entry options_table[] = {
OPTIONS_TABLE_HOOK("window-linked", ""),
OPTIONS_TABLE_WINDOW_HOOK("window-pane-changed", ""),
OPTIONS_TABLE_WINDOW_HOOK("window-renamed", ""),
OPTIONS_TABLE_WINDOW_HOOK("window-resized", ""),
OPTIONS_TABLE_HOOK("window-unlinked", ""),
{ .name = NULL }

View File

@ -61,6 +61,7 @@ resize_window(struct window *w, u_int sx, u_int sy, int xpixel, int ypixel)
tty_update_window_offset(w);
server_redraw_window(w);
notify_window("window-layout-changed", w);
notify_window("window-resized", w);
w->flags &= ~WINDOW_RESIZE;
}