From e171d44eb7b833ea659469deed860e566faa4d03 Mon Sep 17 00:00:00 2001 From: Christian Heller <c.heller@plomlompom.de> Date: Sat, 8 Jun 2013 00:45:04 +0200 Subject: [PATCH] Fixed bug: Pad did not get shrunk with window suspension, leading to obsolete scrollable areas. --- windows.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/windows.c b/windows.c index 099eff5..87b8bbd 100644 --- a/windows.c +++ b/windows.c @@ -58,12 +58,15 @@ void suspend_window (struct WinMeta * win_meta, struct Win * win) { if (win_meta->chain_end != win) { // Let chain element next to win know its new predecessor. win->next->prev = win->prev; if (win_meta->active == win) // If win was active, shift active window pointer to - win_meta->active = win->next; // the next chain element, if that is a window ... - update_windows(win_meta, win->next); } + win_meta->active = win->next; } // the next chain element, if that is a window ... else { win_meta->chain_end = win->prev; if (win_meta->active == win) // ... or else to the previous element. win_meta->active = win->prev; } + if (0 != win->prev) + update_windows(win_meta, win->prev); + else if (0 != win->next) + update_windows(win_meta, win->next); win->prev = 0; win->next = 0; } -- 2.30.2