mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-16 07:47:22 +01:00
tests: Add client self-resizing support to the tests
This commit is contained in:
parent
ae7b173c54
commit
5d944e3c1a
1 changed files with 22 additions and 2 deletions
|
@ -203,8 +203,28 @@ local steps = {
|
|||
function()
|
||||
if #client.get() > 0 then return end
|
||||
|
||||
-- Remove the default handler and replace it with a testing one
|
||||
-- **WARNING**, add test **BEFORE** this function if you want them
|
||||
-- Test if resizing requests work
|
||||
test_client(nil,nil,nil,nil,nil,{resize={width=400, height=400}})
|
||||
|
||||
return true
|
||||
end,
|
||||
function()
|
||||
if #client.get() ~= 1 then return end
|
||||
|
||||
local c = client.get()[1]
|
||||
local _, size = c:titlebar_top()
|
||||
|
||||
if c.width ~= 400 or c.height ~= 400+size then return end
|
||||
|
||||
c:kill()
|
||||
|
||||
return true
|
||||
end,
|
||||
function()
|
||||
if #client.get() > 0 then return end
|
||||
|
||||
-- Remove the default handler and replace it with a testing one.
|
||||
-- **WARNING**: add tests **BEFORE** this function if you want them
|
||||
-- to be relevant.
|
||||
client.disconnect_signal("request::geometry", awful.ewmh.geometry)
|
||||
client.disconnect_signal("request::geometry", awful.ewmh.merge_maximization)
|
||||
|
|
Loading…
Reference in a new issue