diff --git a/tests/examples/awful/template.lua b/tests/examples/awful/template.lua index 75c4feec..aa79ff09 100644 --- a/tests/examples/awful/template.lua +++ b/tests/examples/awful/template.lua @@ -35,8 +35,8 @@ local function draw_mouse(x, y) end -- Print an outline for the screens -if not screen.no_outline then - for _, s in ipairs(screen) do +if not rawget(screen, "no_outline") then + for s in screen do cr:save() -- Draw the screen outline cr:set_source(color("#00000044")) diff --git a/tests/examples/shims/screen.lua b/tests/examples/shims/screen.lua index bf7f119c..171c06e1 100644 --- a/tests/examples/shims/screen.lua +++ b/tests/examples/shims/screen.lua @@ -78,7 +78,7 @@ end function screen._get_extents() local xmax, ymax - for _, v in ipairs(screen) do + for v in screen do if not xmax or v.geometry.x+v.geometry.width > xmax.geometry.x+xmax.geometry.width then xmax = v end