From 7830cf076bd388209cdb8a0dbb8056621875e3e3 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 4 Jun 2016 17:05:42 +0200 Subject: [PATCH] Fix the test that the previous commit added There was a race with autofocus. To overcome this, add another step that tests that moving the client back to a visible tag and focusing it updates _NET_CURRENT_DESKTOP. Afterwards, we kill the client so that it can no longer interfere. Signed-off-by: Uli Schlachter --- tests/test-current-desktop.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test-current-desktop.lua b/tests/test-current-desktop.lua index e4da504c9..7802bb2bb 100644 --- a/tests/test-current-desktop.lua +++ b/tests/test-current-desktop.lua @@ -66,10 +66,16 @@ local steps = { c:move_to_tag(tags[4]) return end + client.focus = c + return true + end, + wait_for_current_desktop(tags[4]), - -- Undo autofocus + -- Killing the client means the first selected tag counts + function() assert(client.focus == c) - client.focus = nil + c:kill() + c = nil return true end, wait_for_current_desktop(tags[3]),