mirror of
https://github.com/swaywm/sway.git
synced 2026-04-30 06:46:24 -04:00
Merge ccc83f7f76 into 7c3b0ffc32
This commit is contained in:
commit
283e7111fc
16 changed files with 24 additions and 27 deletions
|
|
@ -120,18 +120,17 @@ static void ipc_parse_config(struct config *config, const char *payload) {
|
|||
#endif
|
||||
|
||||
// free previous outputs list
|
||||
int i;
|
||||
for (i = 0; i < config->outputs->length; ++i) {
|
||||
for (int i = 0; i < config->outputs->length; ++i) {
|
||||
free(config->outputs->items[i]);
|
||||
}
|
||||
list_free(config->outputs);
|
||||
config->outputs = create_list();
|
||||
|
||||
if (outputs) {
|
||||
int length = json_object_array_length(outputs);
|
||||
size_t length = (size_t)json_object_array_length(outputs);
|
||||
json_object *output;
|
||||
const char *output_str;
|
||||
for (i = 0; i < length; ++i) {
|
||||
for (size_t i = 0; i < length; ++i) {
|
||||
output = json_object_array_get_idx(outputs, i);
|
||||
output_str = json_object_get_string(output);
|
||||
if (strcmp("*", output_str) == 0) {
|
||||
|
|
|
|||
|
|
@ -70,8 +70,7 @@ static void parse_json(struct bar *bar, const char *text) {
|
|||
|
||||
bar->status->block_line = create_list();
|
||||
|
||||
int i;
|
||||
for (i = 0; i < json_object_array_length(results); ++i) {
|
||||
for (size_t i = 0; i < (size_t)json_object_array_length(results); ++i) {
|
||||
json_object *full_text, *short_text, *color, *min_width, *align, *urgent;
|
||||
json_object *name, *instance, *separator, *separator_block_width;
|
||||
json_object *background, *border, *border_top, *border_bottom;
|
||||
|
|
@ -430,7 +429,7 @@ bool status_line_mouse_event(struct bar *bar, int x, int y, uint32_t button) {
|
|||
}
|
||||
|
||||
// event example {"name":"capture","instance":"label","button":1,"x":3431,"y":18}
|
||||
|
||||
|
||||
struct json_object *event_json = json_object_new_object();
|
||||
json_object_object_add(event_json, "name", json_object_new_string(clicked_block->name));
|
||||
if (clicked_block->instance) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue