summaryrefslogtreecommitdiffstats
path: root/swaybar
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-07-09 22:54:30 +0100
committerLibravatar emersion <contact@emersion.fr>2018-07-09 22:54:30 +0100
commit63b4bf500020cf35cebfdce2d73f8e359ff495c2 (patch)
tree76624b3d4820551261e5c15f773c403c1a41264e /swaybar
parentMerge pull request #2223 from RyanDwyer/floating-move (diff)
downloadsway-63b4bf500020cf35cebfdce2d73f8e359ff495c2.tar.gz
sway-63b4bf500020cf35cebfdce2d73f8e359ff495c2.tar.zst
sway-63b4bf500020cf35cebfdce2d73f8e359ff495c2.zip
Update for swaywm/wlroots#1126
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/bar.c2
-rw-r--r--swaybar/i3bar.c4
-rw-r--r--swaybar/ipc.c4
-rw-r--r--swaybar/main.c8
-rw-r--r--swaybar/status_line.c6
5 files changed, 12 insertions, 12 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c
index 5b8028e5..f03c5aea 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -46,7 +46,7 @@ static void swaybar_output_free(struct swaybar_output *output) {
46 if (!output) { 46 if (!output) {
47 return; 47 return;
48 } 48 }
49 wlr_log(L_DEBUG, "Removing output %s", output->name); 49 wlr_log(WLR_DEBUG, "Removing output %s", output->name);
50 zwlr_layer_surface_v1_destroy(output->layer_surface); 50 zwlr_layer_surface_v1_destroy(output->layer_surface);
51 wl_surface_destroy(output->surface); 51 wl_surface_destroy(output->surface);
52 wl_output_destroy(output->output); 52 wl_output_destroy(output->output);
diff --git a/swaybar/i3bar.c b/swaybar/i3bar.c
index 141612a6..26f073c8 100644
--- a/swaybar/i3bar.c
+++ b/swaybar/i3bar.c
@@ -31,7 +31,7 @@ static bool i3bar_parse_json(struct status_line *status, const char *text) {
31 status_error(status, "[failed to parse i3bar json]"); 31 status_error(status, "[failed to parse i3bar json]");
32 return false; 32 return false;
33 } 33 }
34 wlr_log(L_DEBUG, "Got i3bar json: '%s'", text); 34 wlr_log(WLR_DEBUG, "Got i3bar json: '%s'", text);
35 for (size_t i = 0; i < json_object_array_length(results); ++i) { 35 for (size_t i = 0; i < json_object_array_length(results); ++i) {
36 json_object *full_text, *short_text, *color, *min_width, *align, *urgent; 36 json_object *full_text, *short_text, *color, *min_width, *align, *urgent;
37 json_object *name, *instance, *separator, *separator_block_width; 37 json_object *name, *instance, *separator, *separator_block_width;
@@ -193,7 +193,7 @@ bool i3bar_handle_readable(struct status_line *status) {
193 193
194void i3bar_block_send_click(struct status_line *status, 194void i3bar_block_send_click(struct status_line *status,
195 struct i3bar_block *block, int x, int y, uint32_t button) { 195 struct i3bar_block *block, int x, int y, uint32_t button) {
196 wlr_log(L_DEBUG, "block %s clicked", block->name ? block->name : "(nil)"); 196 wlr_log(WLR_DEBUG, "block %s clicked", block->name ? block->name : "(nil)");
197 if (!block->name || !status->i3bar_state.click_events) { 197 if (!block->name || !status->i3bar_state.click_events) {
198 return; 198 return;
199 } 199 }
diff --git a/swaybar/ipc.c b/swaybar/ipc.c
index 959fa095..08531f2a 100644
--- a/swaybar/ipc.c
+++ b/swaybar/ipc.c
@@ -327,7 +327,7 @@ bool handle_ipc_readable(struct swaybar *bar) {
327 json_object *result = json_tokener_parse(resp->payload); 327 json_object *result = json_tokener_parse(resp->payload);
328 if (!result) { 328 if (!result) {
329 free_ipc_response(resp); 329 free_ipc_response(resp);
330 wlr_log(L_ERROR, "failed to parse payload as json"); 330 wlr_log(WLR_ERROR, "failed to parse payload as json");
331 return false; 331 return false;
332 } 332 }
333 json_object *json_change, *json_pango_markup; 333 json_object *json_change, *json_pango_markup;
@@ -340,7 +340,7 @@ bool handle_ipc_readable(struct swaybar *bar) {
340 bar->config->mode = strdup(change); 340 bar->config->mode = strdup(change);
341 } 341 }
342 } else { 342 } else {
343 wlr_log(L_ERROR, "failed to parse response"); 343 wlr_log(WLR_ERROR, "failed to parse response");
344 json_object_put(result); 344 json_object_put(result);
345 free_ipc_response(resp); 345 free_ipc_response(resp);
346 return false; 346 return false;
diff --git a/swaybar/main.c b/swaybar/main.c
index c897e1c9..60e4b37c 100644
--- a/swaybar/main.c
+++ b/swaybar/main.c
@@ -75,13 +75,13 @@ int main(int argc, char **argv) {
75 } 75 }
76 76
77 if (debug) { 77 if (debug) {
78 wlr_log_init(L_DEBUG, NULL); 78 wlr_log_init(WLR_DEBUG, NULL);
79 } else { 79 } else {
80 wlr_log_init(L_ERROR, NULL); 80 wlr_log_init(WLR_ERROR, NULL);
81 } 81 }
82 82
83 if (!bar_id) { 83 if (!bar_id) {
84 wlr_log(L_ERROR, "No bar_id passed. " 84 wlr_log(WLR_ERROR, "No bar_id passed. "
85 "Provide --bar_id or let sway start swaybar"); 85 "Provide --bar_id or let sway start swaybar");
86 return 1; 86 return 1;
87 } 87 }
@@ -89,7 +89,7 @@ int main(int argc, char **argv) {
89 if (!socket_path) { 89 if (!socket_path) {
90 socket_path = get_socketpath(); 90 socket_path = get_socketpath();
91 if (!socket_path) { 91 if (!socket_path) {
92 wlr_log(L_ERROR, "Unable to retrieve socket path"); 92 wlr_log(WLR_ERROR, "Unable to retrieve socket path");
93 return 1; 93 return 1;
94 } 94 }
95 } 95 }
diff --git a/swaybar/status_line.c b/swaybar/status_line.c
index e0e7414a..bc47580b 100644
--- a/swaybar/status_line.c
+++ b/swaybar/status_line.c
@@ -49,14 +49,14 @@ bool status_handle_readable(struct status_line *status) {
49 json_object *version; 49 json_object *version;
50 if (json_object_object_get_ex(proto, "version", &version) 50 if (json_object_object_get_ex(proto, "version", &version)
51 && json_object_get_int(version) == 1) { 51 && json_object_get_int(version) == 1) {
52 wlr_log(L_DEBUG, "Switched to i3bar protocol."); 52 wlr_log(WLR_DEBUG, "Switched to i3bar protocol.");
53 status->protocol = PROTOCOL_I3BAR; 53 status->protocol = PROTOCOL_I3BAR;
54 } 54 }
55 json_object *click_events; 55 json_object *click_events;
56 if (json_object_object_get_ex( 56 if (json_object_object_get_ex(
57 proto, "click_events", &click_events) 57 proto, "click_events", &click_events)
58 && json_object_get_boolean(click_events)) { 58 && json_object_get_boolean(click_events)) {
59 wlr_log(L_DEBUG, "Enabled click events."); 59 wlr_log(WLR_DEBUG, "Enabled click events.");
60 status->i3bar_state.click_events = true; 60 status->i3bar_state.click_events = true;
61 const char *events_array = "[\n"; 61 const char *events_array = "[\n";
62 ssize_t len = strlen(events_array); 62 ssize_t len = strlen(events_array);
@@ -91,7 +91,7 @@ struct status_line *status_line_init(char *cmd) {
91 int pipe_read_fd[2]; 91 int pipe_read_fd[2];
92 int pipe_write_fd[2]; 92 int pipe_write_fd[2];
93 if (pipe(pipe_read_fd) != 0 || pipe(pipe_write_fd) != 0) { 93 if (pipe(pipe_read_fd) != 0 || pipe(pipe_write_fd) != 0) {
94 wlr_log(L_ERROR, "Unable to create pipes for status_command fork"); 94 wlr_log(WLR_ERROR, "Unable to create pipes for status_command fork");
95 exit(1); 95 exit(1);
96 } 96 }
97 97