From a0b40bfd8f9cb79af68215e4a911442f5d1155c5 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sun, 28 Aug 2016 22:27:14 -0400 Subject: [PATCH] tests: Try to detect client "manage" signal race conditions. See #1028 --- tests/test-awful-rules.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test-awful-rules.lua b/tests/test-awful-rules.lua index 7dc871a2..dd136d16 100644 --- a/tests/test-awful-rules.lua +++ b/tests/test-awful-rules.lua @@ -11,6 +11,13 @@ local tests = {} local tb_height = awful.util.round(beautiful.get_font_height() * 1.5) -- local border_width = beautiful.border_width +-- Detect "manage" race conditions +local real_apply = awful.rules.apply +function awful.rules.apply(c) + assert(#c:tags() == 0) + return real_apply(c) +end + local function test_rule(rule) rule.rule = rule.rule or {}