This commit is contained in:
Rostislav Pehlivanov 2018-06-15 22:53:22 +00:00 committed by GitHub
commit b7e3cafc3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View file

@ -22,7 +22,7 @@ prefix = get_option('prefix')
swayidle_deps = [] swayidle_deps = []
jsonc = dependency('json-c', version: '>=0.13') jsonc = dependency('json-c', version: '>=0.12')
pcre = dependency('libpcre') pcre = dependency('libpcre')
wlroots = dependency('wlroots', fallback: ['wlroots', 'wlroots']) wlroots = dependency('wlroots', fallback: ['wlroots', 'wlroots'])
wayland_server = dependency('wayland-server') wayland_server = dependency('wayland-server')

View file

@ -524,7 +524,7 @@ void ipc_client_handle_command(struct ipc_client *client) {
} }
// parse requested event types // parse requested event types
for (size_t i = 0; i < json_object_array_length(request); i++) { for (int i = 0; i < json_object_array_length(request); i++) {
const char *event_type = json_object_get_string(json_object_array_get_idx(request, i)); const char *event_type = json_object_get_string(json_object_array_get_idx(request, i));
if (strcmp(event_type, "workspace") == 0) { if (strcmp(event_type, "workspace") == 0) {
client->subscribed_events |= event_mask(IPC_EVENT_WORKSPACE); client->subscribed_events |= event_mask(IPC_EVENT_WORKSPACE);

View file

@ -32,7 +32,7 @@ static bool i3bar_parse_json(struct status_line *status, const char *text) {
return false; return false;
} }
wlr_log(L_DEBUG, "Got i3bar json: '%s'", text); wlr_log(L_DEBUG, "Got i3bar json: '%s'", text);
for (size_t i = 0; i < json_object_array_length(results); ++i) { for (int i = 0; i < json_object_array_length(results); ++i) {
json_object *full_text, *short_text, *color, *min_width, *align, *urgent; json_object *full_text, *short_text, *color, *min_width, *align, *urgent;
json_object *name, *instance, *separator, *separator_block_width; json_object *name, *instance, *separator, *separator_block_width;
json_object *background, *border, *border_top, *border_bottom; json_object *background, *border, *border_top, *border_bottom;

View file

@ -270,7 +270,7 @@ static void ipc_get_outputs(struct swaybar *bar) {
char *res = ipc_single_command(bar->ipc_socketfd, char *res = ipc_single_command(bar->ipc_socketfd,
IPC_GET_OUTPUTS, NULL, &len); IPC_GET_OUTPUTS, NULL, &len);
json_object *outputs = json_tokener_parse(res); json_object *outputs = json_tokener_parse(res);
for (size_t i = 0; i < json_object_array_length(outputs); ++i) { for (int i = 0; i < json_object_array_length(outputs); ++i) {
json_object *output = json_object_array_get_idx(outputs, i); json_object *output = json_object_array_get_idx(outputs, i);
json_object *output_name, *output_active; json_object *output_name, *output_active;
json_object_object_get_ex(output, "name", &output_name); json_object_object_get_ex(output, "name", &output_name);

View file

@ -233,7 +233,7 @@ static void pretty_print_version(json_object *v) {
static void pretty_print_clipboard(json_object *v) { static void pretty_print_clipboard(json_object *v) {
if (success(v, true)) { if (success(v, true)) {
if (json_object_is_type(v, json_type_array)) { if (json_object_is_type(v, json_type_array)) {
for (size_t i = 0; i < json_object_array_length(v); ++i) { for (int i = 0; i < json_object_array_length(v); ++i) {
json_object *o = json_object_array_get_idx(v, i); json_object *o = json_object_array_get_idx(v, i);
printf("%s\n", json_object_get_string(o)); printf("%s\n", json_object_get_string(o));
} }