From f2ab9677cc821999a91150126bcaa50ae8c7d927 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 22 Apr 2013 18:53:42 +0200
Subject: [PATCH] draw_all_windows() only starts drawing cycle if any window is
 actually visible.

---
 windows.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/windows.c b/windows.c
index f879e6b..26267aa 100644
--- a/windows.c
+++ b/windows.c
@@ -120,7 +120,8 @@ void draw_windows (struct WinMeta * win_meta, struct Win * win) {
 
 void draw_all_windows (struct WinMeta * win_meta) {
 // Draw all windows from the chain start on.
-  draw_windows (win_meta, win_meta->chain_start); }
+  if (win_meta->chain_start)
+    draw_windows (win_meta, win_meta->chain_start); }
 
 void draw_window(struct WinMeta * win_meta, struct Win * win) {
 // Draw win's content, including border and title (the latter dependent on space available for it).
-- 
2.30.2