tests: test-resize: use math.ceil to handle uneven screen height
See https://github.com/awesomeWM/awesome/issues/848#issuecomment-216052517. Closes https://github.com/awesomeWM/awesome/pull/869.
This commit is contained in:
parent
95f1b1ad56
commit
612756ff0e
|
@ -276,7 +276,7 @@ table.insert(steps, function()
|
|||
local c = client.get()[1]
|
||||
|
||||
assert(c:geometry().x == c.screen.workarea.x )
|
||||
assert(c:geometry().y == c.screen.workarea.y+c.screen.workarea.height/2 )
|
||||
assert(c:geometry().y == math.ceil(c.screen.workarea.y+c.screen.workarea.height/2))
|
||||
assert(c:geometry().width == c.screen.workarea.width - 2*c.border_width )
|
||||
assert(c:geometry().height == math.ceil(c.screen.workarea.height/2 - 2*c.border_width))
|
||||
|
||||
|
@ -294,7 +294,7 @@ table.insert(steps, function()
|
|||
local c = client.get()[1]
|
||||
|
||||
assert(c:geometry().x == c.screen.workarea.x )
|
||||
assert(c:geometry().y == c.screen.workarea.y+c.screen.workarea.height/2 )
|
||||
assert(c:geometry().y == math.ceil(c.screen.workarea.y+c.screen.workarea.height/2))
|
||||
assert(c:geometry().width == math.ceil(c.screen.workarea.width/2 - 2*c.border_width) )
|
||||
assert(c:geometry().height == math.ceil(c.screen.workarea.height/2 - 2*c.border_width))
|
||||
|
||||
|
|
Loading…
Reference in New Issue