@@ -50,7 +50,8 @@ static json_object *get_focused_container_r(json_object *c) {
50
50
} else {
51
51
json_object * nodes , * node , * child ;
52
52
json_object_object_get_ex (c , "nodes" , & nodes );
53
- for (json_ar_len_t i = 0 ; i < json_object_array_length (nodes ); i ++ ) {
53
+ int i ;
54
+ for (i = 0 ; i < json_object_array_length (nodes ); i ++ ) {
54
55
node = json_object_array_get_idx (nodes , i );
55
56
56
57
if ((child = get_focused_container_r (node ))) {
@@ -59,7 +60,7 @@ static json_object *get_focused_container_r(json_object *c) {
59
60
}
60
61
61
62
json_object_object_get_ex (c , "floating_nodes" , & nodes );
62
- for (json_ar_len_t i = 0 ; i < json_object_array_length (nodes ); i ++ ) {
63
+ for (i = 0 ; i < json_object_array_length (nodes ); i ++ ) {
63
64
node = json_object_array_get_idx (nodes , i );
64
65
65
66
if ((child = get_focused_container_r (node ))) {
@@ -82,7 +83,7 @@ char *get_focused_output() {
82
83
if (!outputs ) {
83
84
sway_abort ("Unabled to get focused output. No nodes in tree." );
84
85
}
85
- for (json_ar_len_t i = 0 ; i < json_object_array_length (outputs ); i ++ ) {
86
+ for (int i = 0 ; i < json_object_array_length (outputs ); i ++ ) {
86
87
output = json_object_array_get_idx (outputs , i );
87
88
88
89
if (get_focused_container_r (output )) {
@@ -130,7 +131,7 @@ json_object *get_output_container(const char *output) {
130
131
json_object * outputs , * json_output , * name ;
131
132
json_object_object_get_ex (tree , "nodes" , & outputs );
132
133
133
- for (json_ar_len_t i = 0 ; i < json_object_array_length (outputs ); i ++ ) {
134
+ for (int i = 0 ; i < json_object_array_length (outputs ); i ++ ) {
134
135
json_output = json_object_array_get_idx (outputs , i );
135
136
json_object_object_get_ex (json_output , "name" , & name );
136
137
0 commit comments