From b2f8c8df89648e2634eb9dfca9e5ad0a8ecaf5bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Lepage=20Vall=C3=A9e?= Date: Thu, 26 Apr 2018 20:47:33 -0400 Subject: [PATCH] placement: Check if the stored screen is valid (#2246) Fixes #2088 --- lib/awful/placement.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/awful/placement.lua b/lib/awful/placement.lua index bf87ed96..db4dd87f 100644 --- a/lib/awful/placement.lua +++ b/lib/awful/placement.lua @@ -1434,8 +1434,9 @@ function placement.restore(d, args) -- Some people consider that once moved to another screen, then -- the memento needs to be upgraded. For now this is only true for -- maximization until someone complains. - if memento.sgeo and memento.screen and args.context == "maximize" - and d.screen and get_screen(memento.screen) ~= get_screen(d.screen) then + if memento.sgeo and memento.screen and memento.screen.valid + and args.context == "maximize" and d.screen + and get_screen(memento.screen) ~= get_screen(d.screen) then -- Use the absolute geometry as the memento also does local sgeo = get_screen(d.screen).geometry