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 <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-02-21 02:53:45 +00:00
parent 6c71146f1c
commit 934c269f9b
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 6 additions and 0 deletions

View File

@ -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) {