From: Christian Heller Date: Fri, 7 Jun 2013 22:45:04 +0000 (+0200) Subject: Fixed bug: Pad did not get shrunk with window suspension, leading to obsolete scrolla... X-Git-Tag: tce~1240 X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/static/%7B%7Bprefix%7D%7D/task?a=commitdiff_plain;h=e171d44eb7b833ea659469deed860e566faa4d03;p=plomrogue Fixed bug: Pad did not get shrunk with window suspension, leading to obsolete scrollable areas. --- 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; }