From b6c7e6751a84122c03d474faa3fc826db73520cb Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Wed, 3 Jul 2019 10:02:28 +0300 Subject: [PATCH] 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 --- tests/test-awful-placement.lua | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/tests/test-awful-placement.lua b/tests/test-awful-placement.lua index 50b18d343..141c86395 100644 --- a/tests/test-awful-placement.lua +++ b/tests/test-awful-placement.lua @@ -105,6 +105,50 @@ for _, _ in ipairs{1, 2, 3} do 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. add_client { geometry = function(wa)