]> git.sur5r.net Git - i3/i3/blobdiff - testcases/lib/i3test.pm.in
i3test::XTEST: don’t “use i3test” to avoid clobbering state
[i3/i3] / testcases / lib / i3test.pm.in
index 5e3f8b2d243c3216a0128c0f16a312078835253c..0f28a7a9f9e32b70b3acb864bcd01789520966c0 100644 (file)
@@ -793,14 +793,7 @@ sub get_socket_path {
     if ($cache && defined($_cached_socket_path)) {
         return $_cached_socket_path;
     }
-
-    my $atom = $x->atom(name => 'I3_SOCKET_PATH');
-    my $cookie = $x->get_property(0, $x->get_root_window(), $atom->id, GET_PROPERTY_TYPE_ANY, 0, 256);
-    my $reply = $x->get_property_reply($cookie->{sequence});
-    my $socketpath = $reply->{value};
-    if ($socketpath eq "/tmp/nested-$ENV{DISPLAY}") {
-        $socketpath .= '-activation';
-    }
+    my $socketpath = i3test::Util::get_socket_path($x);
     $_cached_socket_path = $socketpath;
     return $socketpath;
 }