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 <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-04-17 15:38:11 +02:00 committed by Uli Schlachter
parent fc390ff405
commit 2485d334cf
1 changed files with 5 additions and 0 deletions

View File

@ -162,6 +162,11 @@ function layout.arrange(screen)
delayed_arrange[screen] = true delayed_arrange[screen] = true
timer.delayed_call(function() timer.delayed_call(function()
if not screen.valid then
-- Screen was removed
delayed_arrange[screen] = nil
return
end
if arrange_lock then return end if arrange_lock then return end
arrange_lock = true arrange_lock = true