diff --git a/lib/gears/geometry.lua b/lib/gears/geometry.lua index a5144356..70628888 100644 --- a/lib/gears/geometry.lua +++ b/lib/gears/geometry.lua @@ -176,6 +176,9 @@ function gears.geometry.rectangle.get_intersection(a, b) g.y = math.max(a.y, b.y) g.width = math.min(a.x + a.width, b.x + b.width) - g.x g.height = math.min(a.y + a.height, b.y + b.height) - g.y + if g.width <= 0 or g.height <= 0 then + g.width, g.height = 0, 0 + end return g end