X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=testcases%2Ft%2F114-client-leader.t;h=3ecc644dce2af3210ee99eda9470df2c47fe6a01;hb=f560519f5c91ba337b7bfec4259baf90053d12c3;hp=497bad9e1aa73195bc8eb6d434650032a842fe83;hpb=2ba09f54197b4bd67d9e5a79afee09919508de93;p=i3%2Fi3 diff --git a/testcases/t/114-client-leader.t b/testcases/t/114-client-leader.t index 497bad9e..3ecc644d 100644 --- a/testcases/t/114-client-leader.t +++ b/testcases/t/114-client-leader.t @@ -1,5 +1,18 @@ #!perl # vim:ts=4:sw=4:expandtab +# +# Please read the following documents before working on tests: +# • https://build.i3wm.org/docs/testsuite.html +# (or docs/testsuite) +# +# • https://build.i3wm.org/docs/lib-i3test.html +# (alternatively: perldoc ./testcases/lib/i3test.pm) +# +# • https://build.i3wm.org/docs/ipc.html +# (or docs/ipc) +# +# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf +# (unless you are already familiar with Perl) use i3test; @@ -86,4 +99,27 @@ is($x->input_focus, $child->id, "Child window focused"); } +################################################################################ +# Verify that transient_for can be set and unset. +################################################################################ + +$tmp = fresh_workspace; + +$fwindow = open_window({ dont_map => 1 }); +$fwindow->transient_for($right); +$fwindow->map; + +wait_for_map($fwindow); + +my $floating_con = get_ws($tmp)->{floating_nodes}[0]->{nodes}[0]; +is($floating_con->{window_properties}->{transient_for}, $right->id, 'WM_TRANSIENT_FOR properly parsed'); + +$x->delete_property($fwindow->id, $x->atom(name => 'WM_TRANSIENT_FOR')->id); +$x->flush; + +sync_with_i3; + +$floating_con = get_ws($tmp)->{floating_nodes}[0]->{nodes}[0]; +is($floating_con->{window_properties}->{transient_for}, undef, 'WM_TRANSIENT_FOR properly removed'); + done_testing;