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
nicm 2022-02-17 09:58:47 +00:00 committed by Nicholas Marriott
parent 6a0a783c26
commit 4893edd5d6
2 changed files with 2 additions and 0 deletions

View File

@ -1245,6 +1245,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;
}