]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/295-net-wm-state-focused.t
Update ewmh focused only when new focus is different (#3496)
[i3/i3] / testcases / t / 295-net-wm-state-focused.t
index 1881154e4be362c0576d82c62b4b8604180936c4..fd7c251306ecee62a4446360d8d22f2afae11fcd 100644 (file)
@@ -23,15 +23,17 @@ my ($windowA, $windowB);
 
 fresh_workspace;
 $windowA = open_window;
 
 fresh_workspace;
 $windowA = open_window;
-
 ok(is_net_wm_state_focused($windowA), 'a newly opened window that is focused should have _NET_WM_STATE_FOCUSED set');
 
 $windowB = open_window;
 ok(is_net_wm_state_focused($windowA), 'a newly opened window that is focused should have _NET_WM_STATE_FOCUSED set');
 
 $windowB = open_window;
-
 ok(!is_net_wm_state_focused($windowA), 'when a another window is focused, the old window should not have _NET_WM_STATE_FOCUSED set');
 ok(!is_net_wm_state_focused($windowA), 'when a another window is focused, the old window should not have _NET_WM_STATE_FOCUSED set');
+ok(is_net_wm_state_focused($windowB), 'a newly opened window that is focused should have _NET_WM_STATE_FOCUSED set');
 
 
-fresh_workspace;
+# See issue #3495.
+cmd 'kill';
+ok(is_net_wm_state_focused($windowA), 'when the second window is closed, the first window should have _NET_WM_STATE_FOCUSED set');
 
 
-ok(!is_net_wm_state_focused($windowB), 'when focus moves to the ewmh support window, neither window should have _NET_WM_STATE_FOCUSED set');
+fresh_workspace;
+ok(!is_net_wm_state_focused($windowA), 'when focus moves to the ewmh support window, no window should have _NET_WM_STATE_FOCUSED set');
 
 done_testing;
 
 done_testing;