From 733c301c7dad941dd0e01cfadd33a4455d62138e Mon Sep 17 00:00:00 2001 From: Charlotte Meyer Date: Mon, 15 Apr 2019 11:37:37 +0200 Subject: [PATCH] clang-format --- include/kiwmi/commands.h | 6 ++---- kiwmi/commands.c | 6 +++--- kiwmi/desktop/desktop.c | 2 +- kiwmi/desktop/output.c | 7 ++++--- kiwmi/input/input.c | 2 +- kiwmi/server.c | 4 ++-- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/include/kiwmi/commands.h b/include/kiwmi/commands.h index 227891c..ae1bd5b 100644 --- a/include/kiwmi/commands.h +++ b/include/kiwmi/commands.h @@ -13,9 +13,7 @@ #include "kiwmi/server.h" -bool handle_client_command( - char *command, - FILE *client, - struct kiwmi_server *server); +bool +handle_client_command(char *command, FILE *client, struct kiwmi_server *server); #endif /* KIWMI_COMMANDS_H */ diff --git a/kiwmi/commands.c b/kiwmi/commands.c index f3f6d0a..c6b332f 100644 --- a/kiwmi/commands.c +++ b/kiwmi/commands.c @@ -37,9 +37,9 @@ handle_client_command(char *command, FILE *client, struct kiwmi_server *server) const char *name = strtok(command, " \t\r"); for (size_t i = 0; i < SIZE(commands); ++i) { - if (strcmp(name, commands[i].name) == 0) { - return commands[i].handler(client, NULL, server); - } + if (strcmp(name, commands[i].name) == 0) { + return commands[i].handler(client, NULL, server); + } } fprintf(client, "Unknown command: %s\n", name); diff --git a/kiwmi/desktop/desktop.c b/kiwmi/desktop/desktop.c index 08681f7..3dae385 100644 --- a/kiwmi/desktop/desktop.c +++ b/kiwmi/desktop/desktop.c @@ -15,8 +15,8 @@ #include #include -#include "kiwmi/server.h" #include "kiwmi/desktop/output.h" +#include "kiwmi/server.h" bool desktop_init(struct kiwmi_desktop *desktop, struct wlr_renderer *renderer) diff --git a/kiwmi/desktop/output.c b/kiwmi/desktop/output.c index 9dfb494..05e8835 100644 --- a/kiwmi/desktop/output.c +++ b/kiwmi/desktop/output.c @@ -17,10 +17,10 @@ #include #include -#include "kiwmi/server.h" #include "kiwmi/desktop/desktop.h" #include "kiwmi/input/cursor.h" #include "kiwmi/input/input.h" +#include "kiwmi/server.h" static void output_frame_notify(struct wl_listener *listener, void *data) @@ -54,7 +54,8 @@ output_destroy_notify(struct wl_listener *listener, void *UNUSED(data)) { struct kiwmi_output *output = wl_container_of(listener, output, destroy); - wlr_output_layout_remove(output->desktop->output_layout, output->wlr_output); + wlr_output_layout_remove( + output->desktop->output_layout, output->wlr_output); wl_list_remove(&output->link); wl_list_remove(&output->frame.link); @@ -72,7 +73,7 @@ output_create(struct wlr_output *wlr_output, struct kiwmi_desktop *desktop) } output->wlr_output = wlr_output; - output->desktop = desktop; + output->desktop = desktop; output->frame.notify = output_frame_notify; wl_signal_add(&wlr_output->events.frame, &output->frame); diff --git a/kiwmi/input/input.c b/kiwmi/input/input.c index ccb6382..a3cf7c0 100644 --- a/kiwmi/input/input.c +++ b/kiwmi/input/input.c @@ -13,10 +13,10 @@ #include #include -#include "kiwmi/server.h" #include "kiwmi/desktop/desktop.h" #include "kiwmi/input/cursor.h" #include "kiwmi/input/keyboard.h" +#include "kiwmi/server.h" static void new_pointer(struct kiwmi_input *input, struct wlr_input_device *device) diff --git a/kiwmi/server.c b/kiwmi/server.c index fce1d71..6798d82 100644 --- a/kiwmi/server.c +++ b/kiwmi/server.c @@ -19,9 +19,9 @@ server_init(struct kiwmi_server *server, const char *frontend_path) { wlr_log(WLR_DEBUG, "Initializing Wayland server"); - server->wl_display = wl_display_create(); + server->wl_display = wl_display_create(); server->wl_event_loop = wl_display_get_event_loop(server->wl_display); - server->backend = wlr_backend_autocreate(server->wl_display, NULL); + server->backend = wlr_backend_autocreate(server->wl_display, NULL); if (!server->backend) { wlr_log(WLR_ERROR, "Failed to create backend"); wl_display_destroy(server->wl_display);