]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/293-focus-follows-mouse.t
Merge pull request #3452 from orestisf1993/title_align
[i3/i3] / testcases / t / 293-focus-follows-mouse.t
index 9fb1004e6af14636a2f73cf88ea61a8ddc557e07..55958c3ea3b8bd218f35a2f29e3f3af9130448a4 100644 (file)
@@ -57,4 +57,29 @@ is($x->input_focus, $second->id, 'second (tabbed) window focused');
 synced_warp_pointer(0, 0);
 is($x->input_focus, $second->id, 'second window still focused');
 
+###################################################################
+# Test that floating windows are focused but not raised to the top.
+# See issue #2990.
+###################################################################
+
+my $ws;
+my $tmp = fresh_workspace;
+my ($first_floating, $second_floating);
+
+synced_warp_pointer(0, 0);
+$first_floating = open_floating_window(rect => [ 1, 1, 100, 100 ]);
+$second_floating = open_floating_window(rect => [ 50, 50, 100, 100 ]);
+$first = open_window;
+
+is($x->input_focus, $first->id, 'first (tiling) window focused');
+$ws = get_ws($tmp);
+is($ws->{floating_nodes}->[1]->{nodes}->[0]->{window}, $second_floating->id, 'second floating on top');
+is($ws->{floating_nodes}->[0]->{nodes}->[0]->{window}, $first_floating->id, 'first floating behind');
+
+synced_warp_pointer(40, 40);
+is($x->input_focus, $first_floating->id, 'first floating window focused');
+$ws = get_ws($tmp);
+is($ws->{floating_nodes}->[1]->{nodes}->[0]->{window}, $second_floating->id, 'second floating still on top');
+is($ws->{floating_nodes}->[0]->{nodes}->[0]->{window}, $first_floating->id, 'first floating still behind');
+
 done_testing;