Hi!

During some testing, I noticed that when changing to one of the preset
layouts, the window-layout-change notification does not get sent. This
patch corrects the behavior.

Joshua Brot

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
From 8c3be989577e02cf0bc147535eea7030e34c71f2 Mon Sep 17 00:00:00 2001
From: Joshua Brot <[email protected]>
Date: Sun, 14 May 2017 12:32:40 -0500
Subject: [PATCH] Added missing layout change notifications in preset layouts.

Signed-off-by: Joshua Brot <[email protected]>
---
 layout-set.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/layout-set.c b/layout-set.c
index db621f61..fea45066 100644
--- a/layout-set.c
+++ b/layout-set.c
@@ -143,6 +143,7 @@ layout_set_even_h(struct window *w)
 	i = xoff = 0;
 	TAILQ_FOREACH(wp, &w->panes, entry) {
 		/* Create child cell. */
+	notify_window("window-layout-changed", w);
 		lcnew = layout_create_cell(lc);
 		layout_set_size(lcnew, width, w->sy, xoff, 0);
 		layout_make_leaf(lcnew, wp);
@@ -165,6 +166,7 @@ layout_set_even_h(struct window *w)
 
 	layout_print_cell(w->layout_root, __func__, 1);
 
+	notify_window("window-layout-changed", w);
 	server_redraw_window(w);
 }
 
@@ -219,6 +221,7 @@ layout_set_even_v(struct window *w)
 
 	layout_print_cell(w->layout_root, __func__, 1);
 
+	notify_window("window-layout-changed", w);
 	server_redraw_window(w);
 }
 
@@ -342,6 +345,7 @@ layout_set_main_h(struct window *w)
 
 	layout_print_cell(w->layout_root, __func__, 1);
 
+	notify_window("window-layout-changed", w);
 	server_redraw_window(w);
 }
 
@@ -465,6 +469,7 @@ layout_set_main_v(struct window *w)
 
 	layout_print_cell(w->layout_root, __func__, 1);
 
+	notify_window("window-layout-changed", w);
 	server_redraw_window(w);
 }
 
@@ -567,5 +572,6 @@ layout_set_tiled(struct window *w)
 
 	layout_print_cell(w->layout_root, __func__, 1);
 
+	notify_window("window-layout-changed", w);
 	server_redraw_window(w);
 }
-- 
2.12.2

Reply via email to