From 15f63c700c34386887be6fb161ed088e573613fc Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Thu, 28 Oct 2021 20:25:35 -0700 Subject: [PATCH] tests: Add size changes to the `xeyes` test. It should trigger some shape related code in the core which wasn't hit reliably until now. --- tests/test-client-shape.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/test-client-shape.lua b/tests/test-client-shape.lua index 5bb88a1d..84235e35 100644 --- a/tests/test-client-shape.lua +++ b/tests/test-client-shape.lua @@ -11,6 +11,18 @@ runner.run_steps{ assert(type(a) == "number", a) end if #client.get() == 1 then + local c = client.get()[1] + + local geo = c:geometry() + + -- Resize it to test shape change events. + c:geometry { + x = geo.x, + y = geo.y, + width = geo.width * 2, + height = geo.height * 2, + } + return true end end, @@ -27,8 +39,15 @@ runner.run_steps{ assert(not surface.load_silently(c.client_shape_clip, false)) assert(not surface.load_silently(c.shape_clip, false)) + return true + end, + + function() + client.get()[1]:kill() return true end + + } -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80