#!perl # vim:ts=4:sw=4:expandtab # !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3 # # Tests the new_window and new_float config option. # use i3test; my $x = X11::XCB::Connection->new; ##################################################################### # 1: check that new windows start with 'normal' border unless configured # otherwise ##################################################################### my $config = <{border}, 'normal', 'border normal by default'); exit_gracefully($process->pid); ##################################################################### # 2: check that new tiling windows start with '1pixel' border when # configured ##################################################################### $config = <{border}, '1pixel', 'border normal by default'); exit_gracefully($process->pid); ##################################################################### # 3: check that new floating windows start with 'normal' border unless # configured otherwise ##################################################################### $config = <root->create_child( class => WINDOW_CLASS_INPUT_OUTPUT, rect => [ 0, 0, 30, 30], background_color => '#C0C0C0', # replace the type with 'utility' as soon as the coercion works again in X11::XCB window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY'), event_mask => [ 'structure_notify' ], ); $first->map; wait_for_map $x; my $wscontent = get_ws($tmp); my @floating = @{$wscontent->{floating_nodes}}; ok(@floating == 1, 'one floating container opened'); my $floatingcon = $floating[0]; is($floatingcon->{nodes}->[0]->{border}, 'normal', 'border normal by default'); exit_gracefully($process->pid); ##################################################################### # 4: check that new floating windows start with '1pixel' border when # configured ##################################################################### $config = <root->create_child( class => WINDOW_CLASS_INPUT_OUTPUT, rect => [ 0, 0, 30, 30], background_color => '#C0C0C0', # replace the type with 'utility' as soon as the coercion works again in X11::XCB window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY'), event_mask => [ 'structure_notify' ], ); $first->map; wait_for_map $x; $wscontent = get_ws($tmp); @floating = @{$wscontent->{floating_nodes}}; ok(@floating == 1, 'one floating container opened'); $floatingcon = $floating[0]; is($floatingcon->{nodes}->[0]->{border}, '1pixel', 'border normal by default'); exit_gracefully($process->pid); done_testing;