tests: Test mouse.move on odd sized clients.

Close #1039
This commit is contained in:
Emmanuel Lepage Vallee 2016-08-12 17:01:08 -04:00
parent 19d4a3f602
commit 9d69448ac1
1 changed files with 33 additions and 0 deletions

View File

@ -403,6 +403,39 @@ table.insert(steps, function()
assert(c.first_tag == cur_tag)
c:geometry {
x = 99,
y = 99,
width = 99,
height = 99,
}
return true
end)
-- Test that odd number sized clients don't move by accident
for _=1, 15 do
table.insert(steps, function()
local c = client.get()[1]
root.fake_input("button_press",1)
amouse.client.move(c)
root.fake_input("button_release",1)
return true
end)
end
table.insert(steps, function()
local c = client.get()[1]
root.fake_input("button_release",1)
assert(c.x == 99)
assert(c.y == 99)
assert(c.width == 99)
assert(c.height == 99)
return true
end)