Merge branch 'placement-fallback-to-screen.workarea' of https://github.com/blueyed/awesome

This commit is contained in:
Uli Schlachter 2016-04-30 09:11:33 +02:00
commit a60b718db2
1 changed files with 6 additions and 1 deletions

View File

@ -555,8 +555,13 @@ function placement.no_overlap(c)
end end
-- We did not find an area with enough space for our size: -- We did not find an area with enough space for our size:
-- just take the biggest available one and go in -- just take the biggest available one and go in.
-- This makes sure to have the whole screen's area in case it has been
-- removed.
if not found then if not found then
if #areas == 0 then
areas = { screen.workarea }
end
for _, r in ipairs(areas) do for _, r in ipairs(areas) do
if r.width * r.height > new.width * new.height then if r.width * r.height > new.width * new.height then
new = r new = r