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 # Test _NET_CLOSE_WINDOW requests to close a window.
18 # See http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472668896
20 # Bug still in: 4.8-116-gbb1f857
23 sub send_close_window_request {
26 my $msg = pack "CCSLLLLLL",
27 X11::XCB::CLIENT_MESSAGE, # response_type
31 $x->atom(name => '_NET_CLOSE_WINDOW')->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_close_window_request($win);
47 is(@{get_ws($ws)->{nodes}}, 0, 'When a pager sends a _NET_CLOSE_WINDOW request for a window, the container should be closed');