clang-format

This commit is contained in:
buffet 2019-04-15 11:37:37 +02:00
parent da4f881cc9
commit 733c301c7d
6 changed files with 13 additions and 14 deletions

View file

@ -13,9 +13,7 @@
#include "kiwmi/server.h" #include "kiwmi/server.h"
bool handle_client_command( bool
char *command, handle_client_command(char *command, FILE *client, struct kiwmi_server *server);
FILE *client,
struct kiwmi_server *server);
#endif /* KIWMI_COMMANDS_H */ #endif /* KIWMI_COMMANDS_H */

View file

@ -37,9 +37,9 @@ handle_client_command(char *command, FILE *client, struct kiwmi_server *server)
const char *name = strtok(command, " \t\r"); const char *name = strtok(command, " \t\r");
for (size_t i = 0; i < SIZE(commands); ++i) { for (size_t i = 0; i < SIZE(commands); ++i) {
if (strcmp(name, commands[i].name) == 0) { if (strcmp(name, commands[i].name) == 0) {
return commands[i].handler(client, NULL, server); return commands[i].handler(client, NULL, server);
} }
} }
fprintf(client, "Unknown command: %s\n", name); fprintf(client, "Unknown command: %s\n", name);

View file

@ -15,8 +15,8 @@
#include <wlr/types/wlr_data_device.h> #include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_output_layout.h> #include <wlr/types/wlr_output_layout.h>
#include "kiwmi/server.h"
#include "kiwmi/desktop/output.h" #include "kiwmi/desktop/output.h"
#include "kiwmi/server.h"
bool bool
desktop_init(struct kiwmi_desktop *desktop, struct wlr_renderer *renderer) desktop_init(struct kiwmi_desktop *desktop, struct wlr_renderer *renderer)

View file

@ -17,10 +17,10 @@
#include <wlr/types/wlr_xcursor_manager.h> #include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "kiwmi/server.h"
#include "kiwmi/desktop/desktop.h" #include "kiwmi/desktop/desktop.h"
#include "kiwmi/input/cursor.h" #include "kiwmi/input/cursor.h"
#include "kiwmi/input/input.h" #include "kiwmi/input/input.h"
#include "kiwmi/server.h"
static void static void
output_frame_notify(struct wl_listener *listener, void *data) 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); 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->link);
wl_list_remove(&output->frame.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->wlr_output = wlr_output;
output->desktop = desktop; output->desktop = desktop;
output->frame.notify = output_frame_notify; output->frame.notify = output_frame_notify;
wl_signal_add(&wlr_output->events.frame, &output->frame); wl_signal_add(&wlr_output->events.frame, &output->frame);

View file

@ -13,10 +13,10 @@
#include <wlr/types/wlr_input_device.h> #include <wlr/types/wlr_input_device.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "kiwmi/server.h"
#include "kiwmi/desktop/desktop.h" #include "kiwmi/desktop/desktop.h"
#include "kiwmi/input/cursor.h" #include "kiwmi/input/cursor.h"
#include "kiwmi/input/keyboard.h" #include "kiwmi/input/keyboard.h"
#include "kiwmi/server.h"
static void static void
new_pointer(struct kiwmi_input *input, struct wlr_input_device *device) new_pointer(struct kiwmi_input *input, struct wlr_input_device *device)

View file

@ -19,9 +19,9 @@ server_init(struct kiwmi_server *server, const char *frontend_path)
{ {
wlr_log(WLR_DEBUG, "Initializing Wayland server"); 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->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) { if (!server->backend) {
wlr_log(WLR_ERROR, "Failed to create backend"); wlr_log(WLR_ERROR, "Failed to create backend");
wl_display_destroy(server->wl_display); wl_display_destroy(server->wl_display);