clang-format
This commit is contained in:
parent
da4f881cc9
commit
733c301c7d
6 changed files with 13 additions and 14 deletions
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
#include <wlr/types/wlr_data_device.h>
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
|
||||
#include "kiwmi/server.h"
|
||||
#include "kiwmi/desktop/output.h"
|
||||
#include "kiwmi/server.h"
|
||||
|
||||
bool
|
||||
desktop_init(struct kiwmi_desktop *desktop, struct wlr_renderer *renderer)
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
#include <wlr/types/wlr_xcursor_manager.h>
|
||||
#include <wlr/util/log.h>
|
||||
|
||||
#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);
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
#include <wlr/types/wlr_input_device.h>
|
||||
#include <wlr/util/log.h>
|
||||
|
||||
#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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue