i3/testcases/t/63-wm-state.t
Michael Stapelberg de5286da59 tests: lib/i3test: Remove open_standard_window, introduce open_window
open_window has a better API than open_standard_window. It uses named
parameters and supplies default values for everything you don’t specify. This
way, you can use every feature which X11::XCB::Window supports.
2011-09-24 15:11:37 +01:00

25 lines
433 B
Perl

#!perl
# vim:ts=4:sw=4:expandtab
#
# Tests if WM_STATE is WM_STATE_NORMAL when mapped and WM_STATE_WITHDRAWN when
# unmapped.
#
use X11::XCB qw(:all);
use i3test;
my $x = X11::XCB::Connection->new;
my $window = open_window($x);
sync_with_i3($x);
is($window->state, ICCCM_WM_STATE_NORMAL, 'WM_STATE normal');
$window->unmap;
wait_for_unmap $x;
is($window->state, ICCCM_WM_STATE_WITHDRAWN, 'WM_STATE withdrawn');
done_testing;