awful.layout: Use awful.screen to compute geometry
This commit is contained in:
parent
83df30d3a4
commit
a3542c638a
|
@ -136,27 +136,18 @@ function layout.parameters(t, screen)
|
||||||
|
|
||||||
local p = {}
|
local p = {}
|
||||||
|
|
||||||
p.workarea = screen.workarea
|
|
||||||
|
|
||||||
local useless_gap = t and tag.getgap(t, #client.tiled(screen)) or 0
|
local useless_gap = t and tag.getgap(t, #client.tiled(screen)) or 0
|
||||||
|
|
||||||
-- Handle padding
|
p.workarea = ascreen.get_bounding_geometry(screen, {
|
||||||
local padding = ascreen.padding(screen) or {}
|
honor_padding = true,
|
||||||
|
honor_workarea = true,
|
||||||
p.workarea.x = p.workarea.x + (padding.left or 0) + useless_gap
|
margins = useless_gap,
|
||||||
|
})
|
||||||
p.workarea.y = p.workarea.y + (padding.top or 0) + useless_gap
|
|
||||||
|
|
||||||
p.workarea.width = p.workarea.width - ((padding.left or 0 ) +
|
|
||||||
(padding.right or 0) + useless_gap * 2)
|
|
||||||
|
|
||||||
p.workarea.height = p.workarea.height - ((padding.top or 0) +
|
|
||||||
(padding.bottom or 0) + useless_gap * 2)
|
|
||||||
|
|
||||||
p.geometry = screen.geometry
|
p.geometry = screen.geometry
|
||||||
p.clients = client.tiled(screen)
|
p.clients = client.tiled(screen)
|
||||||
p.screen = screen.index
|
p.screen = screen.index
|
||||||
p.padding = padding
|
p.padding = ascreen.padding(screen)
|
||||||
p.useless_gap = useless_gap
|
p.useless_gap = useless_gap
|
||||||
|
|
||||||
return p
|
return p
|
||||||
|
|
Loading…
Reference in New Issue