2 # vim:ts=4:sw=4:expandtab
3 # Regression test: when only having a floating window on a workspace, it should not be deleted.
9 use_ok('X11::XCB::Window');
12 my $i3 = i3("/tmp/nestedcons");
14 my $tmp = fresh_workspace;
16 #############################################################################
17 # 1: open a floating window, get it mapped
18 #############################################################################
20 ok(workspace_exists($tmp), "workspace $tmp exists");
22 my $x = X11::XCB::Connection->new;
24 # Create a floating window which is smaller than the minimum enforced size of i3
25 my $window = $x->root->create_child(
26 class => WINDOW_CLASS_INPUT_OUTPUT,
27 rect => [ 0, 0, 30, 30],
28 background_color => '#C0C0C0',
29 # replace the type with 'utility' as soon as the coercion works again in X11::XCB
30 window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY'),
33 isa_ok($window, 'X11::XCB::Window');
39 ok($window->mapped, 'Window is mapped');
41 # switch to a different workspace, see if the window is still mapped?
43 my $otmp = fresh_workspace;
45 ok(workspace_exists($otmp), "new workspace $otmp exists");
46 ok(workspace_exists($tmp), "old workspace $tmp still exists");