awful.placement: Keep client position when no space available in no_overlap() (#2139)
This commit is contained in:
parent
da418b56ab
commit
cbfe8274be
|
@ -908,13 +908,18 @@ function placement.no_overlap(c, args)
|
||||||
-- This makes sure to have the whole screen's area in case it has been
|
-- This makes sure to have the whole screen's area in case it has been
|
||||||
-- removed.
|
-- removed.
|
||||||
if not found then
|
if not found then
|
||||||
if #areas == 0 then
|
if #areas > 0 then
|
||||||
areas = { screen.workarea }
|
for _, r in ipairs(areas) do
|
||||||
end
|
if r.width * r.height > new.width * new.height then
|
||||||
for _, r in ipairs(areas) do
|
new = r
|
||||||
if r.width * r.height > new.width * new.height then
|
end
|
||||||
new = r
|
|
||||||
end
|
end
|
||||||
|
elseif grect.area_intersect_area(geometry, screen.workarea) then
|
||||||
|
new.x = geometry.x
|
||||||
|
new.y = geometry.y
|
||||||
|
else
|
||||||
|
new.x = screen.workarea.x
|
||||||
|
new.y = screen.workarea.y
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue