#
use i3test;
-use X11::XCB qw(:all);
-use X11::XCB::Connection;
my $x = X11::XCB::Connection->new;
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
EOT
-my $process = launch_with_config($config);
+my $pid = launch_with_config($config);
my $tmp = fresh_workspace;
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
-my $first = open_standard_window($x);
+my $first = open_window($x);
my @content = @{get_ws_content($tmp)};
ok(@content == 1, 'one container opened');
is($content[0]->{border}, 'normal', 'border normal by default');
-exit_gracefully($process->pid);
+exit_gracefully($pid);
#####################################################################
# 2: check that new tiling windows start with '1pixel' border when
new_window 1pixel
EOT
-$process = launch_with_config($config);
+$pid = launch_with_config($config);
$tmp = fresh_workspace;
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
-$first = open_standard_window($x);
+$first = open_window($x);
@content = @{get_ws_content($tmp)};
ok(@content == 1, 'one container opened');
is($content[0]->{border}, '1pixel', 'border normal by default');
-exit_gracefully($process->pid);
+exit_gracefully($pid);
#####################################################################
# 3: check that new floating windows start with 'normal' border unless
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
EOT
-$process = launch_with_config($config);
+$pid = launch_with_config($config);
$tmp = fresh_workspace;
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
-# Create a floating window which is smaller than the minimum enforced size of i3
-$first = $x->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'),
-);
-
-$first->map;
-
-sleep 0.25;
+$first = open_floating_window($x);
my $wscontent = get_ws($tmp);
my @floating = @{$wscontent->{floating_nodes}};
my $floatingcon = $floating[0];
is($floatingcon->{nodes}->[0]->{border}, 'normal', 'border normal by default');
-exit_gracefully($process->pid);
+exit_gracefully($pid);
#####################################################################
# 4: check that new floating windows start with '1pixel' border when
new_float 1pixel
EOT
-$process = launch_with_config($config);
+$pid = launch_with_config($config);
$tmp = fresh_workspace;
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
-# Create a floating window which is smaller than the minimum enforced size of i3
-$first = $x->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'),
-);
-
-$first->map;
-
-sleep 0.25;
+$first = open_floating_window($x);
$wscontent = get_ws($tmp);
@floating = @{$wscontent->{floating_nodes}};
$floatingcon = $floating[0];
is($floatingcon->{nodes}->[0]->{border}, '1pixel', 'border normal by default');
-exit_gracefully($process->pid);
+exit_gracefully($pid);
done_testing;