Apply formatting

This commit is contained in:
raichoo 2022-01-13 09:16:10 +00:00
parent d958a0cfaf
commit 827c630a50
2 changed files with 14 additions and 7 deletions

View File

@ -215,7 +215,8 @@ new_output_handler(struct wl_listener *listener, void *data)
struct wlr_output *wlr_output = data;
struct hikari_output *output = hikari_malloc(sizeof(struct hikari_output));
if (!wlr_output_init_render(wlr_output, server->allocator, server->renderer)) {
if (!wlr_output_init_render(
wlr_output, server->allocator, server->renderer)) {
exit(EXIT_FAILURE);
}
@ -774,7 +775,8 @@ init_noop_output(struct hikari_server *server)
{
server->noop_backend = wlr_headless_backend_create(server->display);
struct wlr_output *wlr_output = wlr_headless_add_output(server->noop_backend, 800, 600);
struct wlr_output *wlr_output =
wlr_headless_add_output(server->noop_backend, 800, 600);
struct hikari_output *noop_output =
hikari_malloc(sizeof(struct hikari_output));
@ -830,7 +832,8 @@ server_init(struct hikari_server *server, char *config_path)
wlr_renderer_init_wl_display(server->renderer, server->display);
server->allocator = wlr_allocator_autocreate(server->backend, server->renderer);
server->allocator =
wlr_allocator_autocreate(server->backend, server->renderer);
if (server->allocator == NULL) {
wl_display_destroy(server->display);
exit(EXIT_FAILURE);

View File

@ -809,13 +809,15 @@ hikari_view_map(struct hikari_view *view, struct wlr_surface *surface)
wl_signal_add(&surface->events.new_subsurface, &view->new_subsurface);
struct wlr_subsurface *wlr_subsurface;
wl_list_for_each (wlr_subsurface, &surface->current.subsurfaces_below, current.link) {
wl_list_for_each (
wlr_subsurface, &surface->current.subsurfaces_below, current.link) {
struct hikari_view_subsurface *subsurface =
(struct hikari_view_subsurface *)malloc(
sizeof(struct hikari_view_subsurface));
hikari_view_subsurface_init(subsurface, view, wlr_subsurface);
}
wl_list_for_each (wlr_subsurface, &surface->current.subsurfaces_above, current.link) {
wl_list_for_each (
wlr_subsurface, &surface->current.subsurfaces_above, current.link) {
struct hikari_view_subsurface *subsurface =
(struct hikari_view_subsurface *)malloc(
sizeof(struct hikari_view_subsurface));
@ -1695,10 +1697,12 @@ hikari_view_child_init(struct hikari_view_child *view_child,
wl_list_insert(&parent->children, &view_child->link);
struct wlr_subsurface *subsurface;
wl_list_for_each (subsurface, &surface->current.subsurfaces_below, current.link) {
wl_list_for_each (
subsurface, &surface->current.subsurfaces_below, current.link) {
view_subsurface_create(subsurface, parent);
}
wl_list_for_each (subsurface, &surface->current.subsurfaces_above, current.link) {
wl_list_for_each (
subsurface, &surface->current.subsurfaces_above, current.link) {
view_subsurface_create(subsurface, parent);
}
}