]> git.sur5r.net Git - i3/i3/blob - testcases/t/137-floating-unmap.t
tests: replace http:// with https:// where appropriate
[i3/i3] / testcases / t / 137-floating-unmap.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Please read the following documents before working on tests:
5 # • https://build.i3wm.org/docs/testsuite.html
6 #   (or docs/testsuite)
7 #
8 # • https://build.i3wm.org/docs/lib-i3test.html
9 #   (alternatively: perldoc ./testcases/lib/i3test.pm)
10 #
11 # • https://build.i3wm.org/docs/ipc.html
12 #   (or docs/ipc)
13 #
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 #   (unless you are already familiar with Perl)
16 #
17 # Regression test: Floating windows were not correctly unmapped when switching
18 # to a different workspace.
19
20 use i3test;
21
22 my $i3 = i3(get_socket_path());
23
24 my $tmp = fresh_workspace;
25
26 #############################################################################
27 # 1: open a floating window, get it mapped
28 #############################################################################
29
30 # Create a floating window which is smaller than the minimum enforced size of i3
31 my $window = open_floating_window;
32 ok($window->mapped, 'Window is mapped');
33
34 # switch to a different workspace, see if the window is still mapped?
35
36 my $otmp = fresh_workspace;
37
38 sync_with_i3;
39
40 ok(!$window->mapped, 'Window is not mapped after switching ws');
41
42 cmd "nop testcase done";
43
44 done_testing;