2 # vim:ts=4:sw=4:expandtab
4 # Please read the following documents before working on tests:
5 # • https://build.i3wm.org/docs/testsuite.html
8 # • https://build.i3wm.org/docs/lib-i3test.html
9 # (alternatively: perldoc ./testcases/lib/i3test.pm)
11 # • https://build.i3wm.org/docs/ipc.html
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 # (unless you are already familiar with Perl)
17 # Test reconfiguration of dock clients.
19 use i3test i3_config => <<EOT;
21 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
23 fake-outputs 1024x768+0+0,1024x768+1024+0
26 # Disable i3bar, which is also a dock client.
34 ###############################################################################
35 # 1: Given two screens A and B and a dock client on screen A, when the dock
36 # client is reconfigured to be positioned on screen B, then the client is
37 # moved to the correct position.
38 ###############################################################################
40 $window = open_window({
41 window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK')
44 $rect = $window->rect;
45 is($rect->x, 0, 'sanity check: dock client is on the left screen');
47 $window->rect(X11::XCB::Rect->new(x => 1024, y => 0, width => 1024, height => 30));
50 @docks = get_dock_clients;
51 is(@docks, 1, 'there is still exactly one dock');
53 is($docks[0]->{rect}->{x}, 1024, 'dock client has moved to the other screen');
55 ###############################################################################