From bf0e8c2862631d41963fdb6bcb3f41667a7eccc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20B=C3=BCrk?= Date: Wed, 11 Feb 2015 20:34:19 +0100 Subject: [PATCH] Remove one level of indentation #1465 --- i3bar/src/child.c | 54 ++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/i3bar/src/child.c b/i3bar/src/child.c index 8645a664..31b99d42 100644 --- a/i3bar/src/child.c +++ b/i3bar/src/child.c @@ -520,33 +520,35 @@ void child_click_events_key(const char *key) { * */ void send_block_clicked(int button, const char *name, const char *instance, int x, int y) { - if (child.click_events) { - child_click_events_initialize(); - - yajl_gen_map_open(gen); - - if (name) { - child_click_events_key("name"); - yajl_gen_string(gen, (const unsigned char *)name, strlen(name)); - } - - if (instance) { - child_click_events_key("instance"); - yajl_gen_string(gen, (const unsigned char *)instance, strlen(instance)); - } - - child_click_events_key("button"); - yajl_gen_integer(gen, button); - - child_click_events_key("x"); - yajl_gen_integer(gen, x); - - child_click_events_key("y"); - yajl_gen_integer(gen, y); - - yajl_gen_map_close(gen); - child_write_output(); + if (!child.click_events) { + return; } + + child_click_events_initialize(); + + yajl_gen_map_open(gen); + + if (name) { + child_click_events_key("name"); + yajl_gen_string(gen, (const unsigned char *)name, strlen(name)); + } + + if (instance) { + child_click_events_key("instance"); + yajl_gen_string(gen, (const unsigned char *)instance, strlen(instance)); + } + + child_click_events_key("button"); + yajl_gen_integer(gen, button); + + child_click_events_key("x"); + yajl_gen_integer(gen, x); + + child_click_events_key("y"); + yajl_gen_integer(gen, y); + + yajl_gen_map_close(gen); + child_write_output(); } /*