match_matches_window: Check if focused->window exists

Fixes #3406.
This commit is contained in:
Orestis Floros
2018-09-15 12:07:10 +03:00
parent 18f705a978
commit 515dd45f59
2 changed files with 35 additions and 51 deletions

View File

@ -105,6 +105,16 @@ is(@{get_ws($ws)->{nodes}}, 2, 'sanity check: workspace contains two windows');
cmd '[workspace=__focused__] move to workspace trash';
is(@{get_ws($ws)->{nodes}}, 0, '__focused__ works for workspace');
###############################################################################
# 6: Test that __focused__ in command criteria when no window is focused does
# not crash i3.
# See issue: #3406
###############################################################################
fresh_workspace;
cmd '[class=__focused__] focus';
does_i3_live;
###############################################################################
done_testing;