]> git.sur5r.net Git - i3/i3/commitdiff
ipc: change border_style to human-readable string instead of enum value
authorMichael Stapelberg <michael@stapelberg.de>
Wed, 11 May 2011 18:39:18 +0000 (20:39 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 11 May 2011 18:39:18 +0000 (20:39 +0200)
src/ipc.c
testcases/t/16-nestedcons.t

index d0dc1920ede581d8a9ef3b826b11bbd226c18048..0535d12205a7786e865d44e8cb6e54aaeeface9b 100644 (file)
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -206,7 +206,17 @@ void dump_node(yajl_gen gen, struct Con *con, bool inplace_restart) {
     y(integer, con->layout);
 
     ystr("border");
-    y(integer, con->border_style);
+    switch (con->border_style) {
+        case BS_NORMAL:
+            ystr("normal");
+            break;
+        case BS_NONE:
+            ystr("none");
+            break;
+        case BS_1PIXEL:
+            ystr("1pixel");
+            break;
+    }
 
     dump_rect(gen, "rect", con->rect);
     dump_rect(gen, "window_rect", con->window_rect);
index e8a124f92ad4cc513d4913d1ce9e933086ae1130..954732ddd07cf7877d1901e2fa61e0bc0cd34e7d 100644 (file)
@@ -30,7 +30,7 @@ my $expected = {
     focus => ignore(),
     focused => 0,
     urgent => 0,
-    border => 0,
+    border => 'normal',
     'floating_nodes' => ignore(),
 };