2 # vim:ts=4:sw=4:expandtab
4 # Please read the following documents before working on tests:
5 # • http://build.i3wm.org/docs/testsuite.html
8 # • http://build.i3wm.org/docs/lib-i3test.html
9 # (alternatively: perldoc ./testcases/lib/i3test.pm)
11 # • http://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 # Correctly handle WM_CHANGE_STATE requests for the iconic state
18 # See http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.4
20 # Bug still in: 4.8-7-gf4a8253
23 sub send_iconic_state_request {
26 my $msg = pack "CCSLLLLLL",
27 X11::XCB::CLIENT_MESSAGE, # response_type
31 $x->atom(name => 'WM_CHANGE_STATE')->id, # message type
38 $x->send_event(0, $x->get_root_window(), X11::XCB::EVENT_MASK_SUBSTRUCTURE_REDIRECT, $msg);
41 my $ws = fresh_workspace;
42 my $win = open_window;
44 send_iconic_state_request($win);
47 is(@{get_ws($ws)->{nodes}}, 0, 'When a window requests the iconic state, the container should be closed');