diff --git a/cagebreak.c b/cagebreak.c index fda54ba..66afdf3 100644 --- a/cagebreak.c +++ b/cagebreak.c @@ -368,7 +368,7 @@ main(int argc, char *argv[]) { wl_event_loop_add_signal(event_loop, SIGPIPE, handle_signal, &server); server.event_loop = event_loop; - backend = wlr_backend_autocreate(server.wl_display,&server.session); + backend = wlr_backend_autocreate(server.wl_display, &server.session); if(!backend) { wlr_log(WLR_ERROR, "Unable to create the wlroots backend"); ret = 1; @@ -428,9 +428,10 @@ main(int argc, char *argv[]) { ret = 1; goto end; } - server.scene_output_layout=wlr_scene_attach_output_layout(server.scene, server.output_layout); + server.scene_output_layout = + wlr_scene_attach_output_layout(server.scene, server.output_layout); - compositor = wlr_compositor_create(server.wl_display,6,server.renderer); + compositor = wlr_compositor_create(server.wl_display, 6, server.renderer); if(!compositor) { wlr_log(WLR_ERROR, "Unable to create the wlroots compositor"); ret = 1; diff --git a/fuzz/fuzz-lib.c b/fuzz/fuzz-lib.c index 661eac6..650d8a8 100644 --- a/fuzz/fuzz-lib.c +++ b/fuzz/fuzz-lib.c @@ -270,9 +270,10 @@ LLVMFuzzerInitialize(int *argc, char ***argv) { ret = 1; goto end; } - server.scene_output_layout=wlr_scene_attach_output_layout(server.scene, server.output_layout); + server.scene_output_layout = + wlr_scene_attach_output_layout(server.scene, server.output_layout); - compositor = wlr_compositor_create(server.wl_display, 5,server.renderer); + compositor = wlr_compositor_create(server.wl_display, 5, server.renderer); if(!compositor) { wlr_log(WLR_ERROR, "Unable to create the wlroots compositor"); ret = 1; diff --git a/keybinding.c b/keybinding.c index 221ca8b..6da0cc6 100644 --- a/keybinding.c +++ b/keybinding.c @@ -1625,7 +1625,8 @@ void set_cursor(bool enabled, struct cg_seat *seat) { if(enabled == true) { seat->enable_cursor = true; - wlr_cursor_set_xcursor(seat->cursor,seat->xcursor_manager, DEFAULT_XCURSOR); + wlr_cursor_set_xcursor(seat->cursor, seat->xcursor_manager, + DEFAULT_XCURSOR); } else { seat->enable_cursor = false; wlr_cursor_unset_image(seat->cursor); @@ -1685,7 +1686,9 @@ run_action(enum keybinding_action action, struct cg_server *server, if(data.u != server->seat->default_mode) { wlr_seat_pointer_notify_clear_focus(server->seat->seat); if(server->seat->enable_cursor == true) { - wlr_cursor_set_xcursor(server->seat->cursor,server->seat->xcursor_manager, "dot_box_mask"); + wlr_cursor_set_xcursor(server->seat->cursor, + server->seat->xcursor_manager, + "dot_box_mask"); } } server->seat->mode = data.u; diff --git a/output.c b/output.c index 74fb0a1..d4fef70 100644 --- a/output.c +++ b/output.c @@ -15,6 +15,7 @@ #include #endif #include +#include #include #include #include @@ -22,7 +23,6 @@ #include #include #include -#include #if CG_HAS_XWAYLAND #include #endif @@ -165,7 +165,7 @@ handle_output_frame(struct wl_listener *listener, void *data) { if(scene_output == NULL) { return; } - wlr_scene_output_commit(scene_output,NULL); + wlr_scene_output_commit(scene_output, NULL); struct timespec now = {0}; clock_gettime(CLOCK_MONOTONIC, &now); @@ -439,7 +439,8 @@ handle_output_commit(struct wl_listener *listener, void *data) { } if(event->state->committed & - (WLR_OUTPUT_STATE_TRANSFORM | WLR_OUTPUT_STATE_SCALE | WLR_OUTPUT_STATE_MODE)) { + (WLR_OUTPUT_STATE_TRANSFORM | WLR_OUTPUT_STATE_SCALE | + WLR_OUTPUT_STATE_MODE)) { struct cg_view *view; wl_list_for_each( view, &output->workspaces[output->curr_workspace]->views, link) { @@ -499,7 +500,7 @@ handle_new_output(struct wl_listener *listener, void *data) { } struct cg_output *output = calloc(1, sizeof(struct cg_output)); - output->scene_output=wlr_scene_output_create(server->scene,wlr_output); + output->scene_output = wlr_scene_output_create(server->scene, wlr_output); if(!output) { wlr_log(WLR_ERROR, "Failed to allocate output"); return; @@ -552,7 +553,7 @@ handle_new_output(struct wl_listener *listener, void *data) { server->curr_output = output; } wlr_cursor_set_xcursor(server->seat->cursor, server->seat->xcursor_manager, - DEFAULT_XCURSOR); + DEFAULT_XCURSOR); wlr_cursor_warp(server->seat->cursor, NULL, 0, 0); output->destroy.notify = handle_output_destroy; diff --git a/seat.c b/seat.c index b6dbc47..1a12c0d 100644 --- a/seat.c +++ b/seat.c @@ -14,13 +14,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #if CG_HAS_XWAYLAND #include @@ -61,7 +61,8 @@ update_capabilities(const struct cg_seat *seat) { seat->enable_cursor == false) { wlr_cursor_unset_image(seat->cursor); } else { - wlr_cursor_set_xcursor(seat->cursor, seat->xcursor_manager, DEFAULT_XCURSOR); + wlr_cursor_set_xcursor(seat->cursor, seat->xcursor_manager, + DEFAULT_XCURSOR); } } @@ -204,8 +205,8 @@ handle_command_key_bindings(struct cg_server *server, xkb_keysym_t sym, &server->scene->tree.node, server->seat->cursor->x, server->seat->cursor->y, &sx, &sy); if(server->seat->enable_cursor) { - wlr_cursor_set_xcursor(server->seat->cursor, server->seat->xcursor_manager, - "left_ptr"); + wlr_cursor_set_xcursor(server->seat->cursor, + server->seat->xcursor_manager, "left_ptr"); if(node && node->type == WLR_SCENE_NODE_BUFFER) { struct wlr_scene_surface *scene_surface = wlr_scene_surface_try_from_buffer( diff --git a/xdg_shell.c b/xdg_shell.c index 3956bf5..79f322f 100644 --- a/xdg_shell.c +++ b/xdg_shell.c @@ -248,7 +248,8 @@ handle_xdg_shell_surface_new(struct wl_listener *listener, void *data) { xdg_shell_view->map.notify = handle_xdg_shell_surface_map; wl_signal_add(&xdg_surface->surface->events.map, &xdg_shell_view->map); xdg_shell_view->unmap.notify = handle_xdg_shell_surface_unmap; - wl_signal_add(&xdg_surface->surface->events.unmap, &xdg_shell_view->unmap); + wl_signal_add(&xdg_surface->surface->events.unmap, + &xdg_shell_view->unmap); xdg_shell_view->destroy.notify = handle_xdg_shell_surface_destroy; wl_signal_add(&xdg_surface->events.destroy, &xdg_shell_view->destroy); xdg_shell_view->request_fullscreen.notify = diff --git a/xwayland.c b/xwayland.c index 785b22e..21cc2ba 100644 --- a/xwayland.c +++ b/xwayland.c @@ -42,7 +42,7 @@ static pid_t get_pid(const struct cg_view *view) { struct wlr_xwayland_surface *surf = wlr_xwayland_surface_try_from_wlr_surface(view->wlr_surface); - if(surf==NULL) { + if(surf == NULL) { return -1; } else { return surf->pid; @@ -177,9 +177,8 @@ static const struct cg_view_impl xwayland_view_impl = { static void handle_xwayland_surface_associate(struct wl_listener *listener, void *data) { struct cg_xwayland_view *xwayland_view = - wl_container_of(listener, xwayland_view, associate); - struct wlr_xwayland_surface *xsurface = - xwayland_view->xwayland_surface; + wl_container_of(listener, xwayland_view, associate); + struct wlr_xwayland_surface *xsurface = xwayland_view->xwayland_surface; wl_signal_add(&xsurface->surface->events.unmap, &xwayland_view->unmap); xwayland_view->unmap.notify = handle_xwayland_surface_unmap; wl_signal_add(&xsurface->surface->events.map, &xwayland_view->map); @@ -189,7 +188,7 @@ handle_xwayland_surface_associate(struct wl_listener *listener, void *data) { static void handle_xwayland_surface_dissociate(struct wl_listener *listener, void *data) { struct cg_xwayland_view *xwayland_view = - wl_container_of(listener, xwayland_view, dissociate); + wl_container_of(listener, xwayland_view, dissociate); wl_list_remove(&xwayland_view->map.link); wl_list_remove(&xwayland_view->unmap.link); } @@ -212,9 +211,11 @@ handle_xwayland_surface_new(struct wl_listener *listener, void *data) { xwayland_view->xwayland_surface = xwayland_surface; xwayland_view->associate.notify = handle_xwayland_surface_associate; - wl_signal_add(&xwayland_surface->events.associate, &xwayland_view->associate); + wl_signal_add(&xwayland_surface->events.associate, + &xwayland_view->associate); xwayland_view->dissociate.notify = handle_xwayland_surface_dissociate; - wl_signal_add(&xwayland_surface->events.dissociate, &xwayland_view->dissociate); + wl_signal_add(&xwayland_surface->events.dissociate, + &xwayland_view->dissociate); xwayland_view->destroy.notify = handle_xwayland_surface_destroy; wl_signal_add(&xwayland_surface->events.destroy, &xwayland_view->destroy); xwayland_view->request_fullscreen.notify =