test-awful-placement: Test no_overlap with hidden and minimized clients

Clients which are hidden or minimized should be ignored by
awful.placement.no_overlap; add a test to verify this behavior.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
This commit is contained in:
Sergey Vlasov 2019-07-03 10:02:28 +03:00
parent 1c27f9d227
commit b6c7e6751a
1 changed files with 44 additions and 0 deletions

View File

@ -105,6 +105,50 @@ for _, _ in ipairs{1, 2, 3} do
end end
} }
-- Hide last client.
do
local data = client_data[#client_data]
table.insert(tests, function()
data.c.hidden = true
return true
end)
end
-- Another 100x100 client should be placed to the right of the first client
-- (the hidden client should be ignored during placement).
add_client {
geometry = function(wa)
return {
width = 100,
height = 100,
expected_x = wa.x + 100 + 2*border_width,
expected_y = wa.y
}
end
}
-- Minimize last client.
do
local data = client_data[#client_data]
table.insert(tests, function()
data.c.minimized = true
return true
end)
end
-- Another 100x100 client should be placed to the right of the first client
-- (the minimized client should be ignored during placement).
add_client {
geometry = function(wa)
return {
width = 100,
height = 100,
expected_x = wa.x + 100 + 2*border_width,
expected_y = wa.y
}
end
}
-- The wide window should be placed below the two 100x100 windows. -- The wide window should be placed below the two 100x100 windows.
add_client { add_client {
geometry = function(wa) geometry = function(wa)