2011-05-13 17:03:52 +02:00
|
|
|
#!perl
|
|
|
|
# vim:ts=4:sw=4:expandtab
|
|
|
|
#
|
2012-09-10 14:09:01 +02:00
|
|
|
# Please read the following documents before working on tests:
|
2017-09-24 10:19:50 +02:00
|
|
|
# • https://build.i3wm.org/docs/testsuite.html
|
2012-09-10 14:09:01 +02:00
|
|
|
# (or docs/testsuite)
|
|
|
|
#
|
2017-09-24 10:19:50 +02:00
|
|
|
# • https://build.i3wm.org/docs/lib-i3test.html
|
2012-09-10 14:09:01 +02:00
|
|
|
# (alternatively: perldoc ./testcases/lib/i3test.pm)
|
|
|
|
#
|
2017-09-24 10:19:50 +02:00
|
|
|
# • https://build.i3wm.org/docs/ipc.html
|
2012-09-10 14:09:01 +02:00
|
|
|
# (or docs/ipc)
|
|
|
|
#
|
|
|
|
# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
|
|
|
|
# (unless you are already familiar with Perl)
|
|
|
|
#
|
2011-05-13 17:03:52 +02:00
|
|
|
# Tests if WM_STATE is WM_STATE_NORMAL when mapped and WM_STATE_WITHDRAWN when
|
|
|
|
# unmapped.
|
|
|
|
#
|
|
|
|
use i3test;
|
2011-11-21 21:39:50 +01:00
|
|
|
use X11::XCB qw(ICCCM_WM_STATE_NORMAL ICCCM_WM_STATE_WITHDRAWN);
|
2011-05-13 17:03:52 +02:00
|
|
|
|
2011-11-22 00:47:32 +01:00
|
|
|
my $window = open_window;
|
2011-05-13 17:03:52 +02:00
|
|
|
|
|
|
|
is($window->state, ICCCM_WM_STATE_NORMAL, 'WM_STATE normal');
|
|
|
|
|
|
|
|
$window->unmap;
|
|
|
|
|
2011-11-21 23:44:20 +01:00
|
|
|
wait_for_unmap $window;
|
2011-05-13 17:03:52 +02:00
|
|
|
|
|
|
|
is($window->state, ICCCM_WM_STATE_WITHDRAWN, 'WM_STATE withdrawn');
|
|
|
|
|
|
|
|
done_testing;
|