]> git.sur5r.net Git - i3/i3/blob - testcases/t/537-move-single-to-output.t
Update ewmh focused only when new focus is different (#3496)
[i3/i3] / testcases / t / 537-move-single-to-output.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Please read the following documents before working on tests:
5 # • https://build.i3wm.org/docs/testsuite.html
6 #   (or docs/testsuite)
7 #
8 # • https://build.i3wm.org/docs/lib-i3test.html
9 #   (alternatively: perldoc ./testcases/lib/i3test.pm)
10 #
11 # • https://build.i3wm.org/docs/ipc.html
12 #   (or docs/ipc)
13 #
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 #   (unless you are already familiar with Perl)
16 #
17 # Tests that windows inside containers with a single child do not jump
18 # over other containers and erratically move across outputs.
19 # Ticket: #2466
20 # Bug still in: 4.14-63-g75d11820
21 use i3test i3_config => <<EOT;
22 # i3 config file (v4)
23 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
24
25 fake-outputs 640x480+0+0,640x480+640+0
26
27 workspace left output fake-0
28 workspace right output fake-1
29 EOT
30
31 cmd 'workspace right';
32
33 # ┌───────────────────────────┐ ┌───────────────────────────┐
34 # │         Output 1          │ │     Output 2 - splith     │
35 # │                           │ │┌───────────┐┌────────────┐│
36 # │                           │ ││           ││   splitv   ││
37 # │                           │ ││           ││╔══════════╗││
38 # │                           │ ││           ││║          ║││
39 # │     (empty workspace)     │ ││   first   ││║  second  ║││
40 # │                           │ ││           ││║          ║││
41 # │                           │ ││           ││║          ║││
42 # │                           │ ││           ││╚══════════╝││
43 # │                           │ │└───────────┘└────────────┘│
44 # └───────────────────────────┘ └───────────────────────────┘
45 #
46 # Moving "second" left shouldn't cause it to jump over to output 1.
47
48 my $first = open_window;
49 my $second = open_window;
50
51 # Put the second window into its own splitv container
52 cmd 'split v';
53
54 is_num_children('left', 0, 'No children on left');
55 is_num_children('right', 2, 'Two children on right');
56
57 # Move the second window to the left
58 cmd 'move left';
59
60 is_num_children('left', 0, 'Still no children on left');
61 is_num_children('right', 2, 'Still two children on right');
62
63 done_testing;