From 4893edd5d67e80e8d4323f6cae02495a7164e3f0 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 17 Feb 2022 09:58:47 +0000 Subject: [PATCH] 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. --- options-table.c | 1 + resize.c | 1 + 2 files changed, 2 insertions(+) diff --git a/options-table.c b/options-table.c index c8ae046e..b8a5ccbb 100644 --- a/options-table.c +++ b/options-table.c @@ -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 } diff --git a/resize.c b/resize.c index 18a02adb..457fee0a 100644 --- a/resize.c +++ b/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); server_redraw_window(w); notify_window("window-layout-changed", w); + notify_window("window-resized", w); w->flags &= ~WINDOW_RESIZE; }