From 2485d334cfc82e747f8663cc8c8e9b64bb1d8d64 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 17 Apr 2016 15:38:11 +0200 Subject: [PATCH] awful.layout.arrange(): Handle screen removal If a screen is removed while a re-layout is pending, previously this code would cause errors and problems. Since the screen is gone, there is nothing to arrange anyway and we can just not do anything. Signed-off-by: Uli Schlachter --- lib/awful/layout/init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/awful/layout/init.lua b/lib/awful/layout/init.lua index 3d32ef08..482bab63 100644 --- a/lib/awful/layout/init.lua +++ b/lib/awful/layout/init.lua @@ -162,6 +162,11 @@ function layout.arrange(screen) delayed_arrange[screen] = true timer.delayed_call(function() + if not screen.valid then + -- Screen was removed + delayed_arrange[screen] = nil + return + end if arrange_lock then return end arrange_lock = true