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 # Verifies the _NET_WORKAREA hint is deleted in case it is already set on the
20 # Bug still in: 4.5.1-103-g1f8a860
21 use i3test i3_autostart => 0;
22 use X11::XCB qw(PROP_MODE_REPLACE);
24 my $atom_cookie = $x->intern_atom(
26 length('_NET_WORKAREA'),
30 my $_net_workarea_id = $x->intern_atom_reply($atom_cookie->{sequence})->{atom};
34 $x->get_root_window(),
36 $x->atom(name => 'CARDINAL')->id,
39 pack('L4', 0, 0, 1024, 768));
42 sub is_net_workarea_set {
43 my $cookie = $x->get_property(
45 $x->get_root_window(),
46 $x->atom(name => '_NET_WORKAREA')->id,
47 $x->atom(name => 'CARDINAL')->id,
51 my $reply = $x->get_property_reply($cookie->{sequence});
52 return 0 if $reply->{value_len} == 0;
53 return 0 if $reply->{format} == 0;
57 ok(is_net_workarea_set(), '_NET_WORKAREA is set before starting i3');
61 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
62 fake-outputs 1024x768+0+0
65 my $pid = launch_with_config($config);
67 ok(!is_net_workarea_set(), '_NET_WORKAREA not set after starting i3');
69 exit_gracefully($pid);