]> git.sur5r.net Git - i3/i3/blobdiff - testcases/lib/i3test.pm
Refactor the interface of commands.c
[i3/i3] / testcases / lib / i3test.pm
index 09c66dc5895189b8be3168fba74bdb0385125fdb..979c60ac73815ca0629a106c697c9b1d779ffa55 100644 (file)
@@ -247,7 +247,7 @@ sub open_empty_con {
     my ($i3) = @_;
 
     my $reply = $i3->command('open')->recv;
-    return $reply->{id};
+    return $reply->[0]->{id};
 }
 
 sub get_workspace_names {
@@ -513,6 +513,8 @@ sub launch_with_config {
 
     $tmp_socket_path = "/tmp/nested-$ENV{DISPLAY}";
 
+    $args{dont_create_temp_dir} //= 0;
+
     my ($fh, $tmpfile) = tempfile("i3-cfg-for-$ENV{TESTNAME}-XXXXX", UNLINK => 1);
 
     if ($config ne '-default') {
@@ -540,6 +542,7 @@ sub launch_with_config {
         strace => $ENV{STRACE},
         restart => $ENV{RESTART},
         cv => $cv,
+        dont_create_temp_dir => $args{dont_create_temp_dir},
     );
 
     # force update of the cached socket path in lib/i3test