home · contact · privacy
Fixed bug: Pad did not get shrunk with window suspension, leading to obsolete scrolla...
authorChristian Heller <c.heller@plomlompom.de>
Fri, 7 Jun 2013 22:45:04 +0000 (00:45 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 7 Jun 2013 22:45:04 +0000 (00:45 +0200)
windows.c

index 099eff58c0626861ac4419f47756c610f8beccaf..87b8bbd39fcdbe692653a9156404f6c15056158e 100644 (file)
--- 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; }