]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/156-fullscreen-focus.t
Allow focus child/parent when in fullscreen.
[i3/i3] / testcases / t / 156-fullscreen-focus.t
index 3a27c9ffa28ea36d50dd35f4f467937f0e6143c6..65d23815706e504993870fbcf7e423f5a1d16686 100644 (file)
@@ -122,6 +122,12 @@ is($x->input_focus, $right1->id, 'upper right window focused');
 cmd '[id="' . $right2->id . '"] focus';
 is($x->input_focus, $right2->id, 'bottom right window focused');
 
+cmd 'focus parent';
+isnt($x->input_focus, $right2->id, 'bottom right window no longer focused');
+
+cmd 'focus child';
+is($x->input_focus, $right2->id, 'bottom right window focused again');
+
 cmd '[id="' . $left->id . '"] focus';
 is($x->input_focus, $right2->id, 'prevented focus change to left window');
 
@@ -129,26 +135,26 @@ cmd '[id="' . $diff_ws->id . '"] focus';
 is($x->input_focus, $right2->id, 'prevented focus change to different ws');
 
 ################################################################################
-# Same tests when we're in non-global fullscreen mode. We toggle fullscreen on
-# and off to avoid testing whether focus level works in fullscreen for now. It
-# should now be possible to focus a container in a different workspace.
+# Same tests when we're in non-global fullscreen mode. It should now be possible
+# to focus a container in a different workspace.
 ################################################################################
 
-cmd 'fullscreen global';
-cmd 'fullscreen global';
-
-cmd '[id="' . $right1->id . '"] focus';
-is($x->input_focus, $right1->id, 'upper right window focused');
-
 cmd 'focus parent';
+cmd 'fullscreen global';
 cmd 'fullscreen';
 
 cmd '[id="' . $right1->id . '"] focus';
-is($x->input_focus, $right1->id, 'upper right window still focused');
+is($x->input_focus, $right1->id, 'upper right window focused');
 
 cmd '[id="' . $right2->id . '"] focus';
 is($x->input_focus, $right2->id, 'bottom right window focused');
 
+cmd 'focus parent';
+isnt($x->input_focus, $right2->id, 'bottom right window no longer focused');
+
+cmd 'focus child';
+is($x->input_focus, $right2->id, 'bottom right window focused again');
+
 cmd '[id="' . $left->id . '"] focus';
 is($x->input_focus, $right2->id, 'prevented focus change to left window');