From 934c269f9b22d94e15260b7f6a0b46928cc2ebb5 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Thu, 21 Feb 2019 02:53:45 +0000 Subject: [PATCH] Update win::reg_ignore_valid when destroying window When destroying a window, set window->next->reg_ignore_valid to false, since its reg_ignore is not valid anymore. Signed-off-by: Yuxuan Shui --- src/win.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/win.c b/src/win.c index 87cbcec..7de9e2b 100644 --- a/src/win.c +++ b/src/win.c @@ -1369,6 +1369,12 @@ finish_destroy_win(session_t *ps, win **_w) { finish_unmap_win(ps, _w); } + // Invalidate reg_ignore of windows below this one + // TODO what if w->next is not mapped?? + if (w->next) { + w->next->reg_ignore_valid = false; + } + log_trace("Trying to destroy (%#010x)", w->id); for (prev = &ps->list; *prev; prev = &(*prev)->next) { if (w == *prev) {