Fix minor style violations

This commit is contained in:
Johan Malm 2021-11-26 19:27:50 +00:00
parent bca57213a0
commit d50c2f2eac
5 changed files with 22 additions and 15 deletions

View file

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __LABWC_H #ifndef __LABWC_H
#define __LABWC_H #define __LABWC_H
#include "config.h" #include "config.h"
@ -395,8 +396,7 @@ void foreign_toplevel_handle_create(struct view *view);
void desktop_raise_view(struct view *view); void desktop_raise_view(struct view *view);
void desktop_focus_and_activate_view(struct seat *seat, struct view *view); void desktop_focus_and_activate_view(struct seat *seat, struct view *view);
enum lab_cycle_dir enum lab_cycle_dir {
{
LAB_CYCLE_DIR_NONE, LAB_CYCLE_DIR_NONE,
LAB_CYCLE_DIR_FORWARD, LAB_CYCLE_DIR_FORWARD,
LAB_CYCLE_DIR_BACKWARD, LAB_CYCLE_DIR_BACKWARD,

View file

@ -408,7 +408,6 @@ rcxml_init()
return; return;
} }
has_run = true; has_run = true;
LIBXML_TEST_VERSION
wl_list_init(&rc.keybinds); wl_list_init(&rc.keybinds);
wl_list_init(&rc.mousebinds); wl_list_init(&rc.mousebinds);
wl_list_init(&rc.libinput_categories); wl_list_init(&rc.libinput_categories);

View file

@ -344,7 +344,8 @@ desktop_surface_and_view_at(struct server *server, double lx, double ly,
} }
struct view * struct view *
desktop_view_at_cursor(struct server *server) { desktop_view_at_cursor(struct server *server)
{
double sx, sy; double sx, sy;
struct wlr_surface *surface; struct wlr_surface *surface;
int view_area = LAB_SSD_NONE; int view_area = LAB_SSD_NONE;

View file

@ -948,9 +948,12 @@ new_output_notify(struct wl_listener *listener, void *data)
struct server *server = wl_container_of(listener, server, new_output); struct server *server = wl_container_of(listener, server, new_output);
struct wlr_output *wlr_output = data; struct wlr_output *wlr_output = data;
/* Configures the output created by the backend to use our allocator /*
* and our renderer. Must be done once, before commiting the output */ * Configures the output created by the backend to use our allocator
if (!wlr_output_init_render(wlr_output, server->allocator, server->renderer)) { * and our renderer. Must be done once, before commiting the output
*/
if (!wlr_output_init_render(wlr_output, server->allocator,
server->renderer)) {
wlr_log(WLR_ERROR, "unable to init output renderer"); wlr_log(WLR_ERROR, "unable to init output renderer");
return; return;
} }

View file

@ -185,10 +185,12 @@ server_init(struct server *server)
*/ */
drop_permissions(); drop_permissions();
/* Autocreates a renderer, either Pixman, GLES2 or Vulkan for us. The user /*
* can also specify a renderer using the WLR_RENDERER env var. * Autocreates a renderer, either Pixman, GLES2 or Vulkan for us. The
* user can also specify a renderer using the WLR_RENDERER env var.
* The renderer is responsible for defining the various pixel formats it * The renderer is responsible for defining the various pixel formats it
* supports for shared memory, this configures that for clients. */ * supports for shared memory, this configures that for clients.
*/
server->renderer = wlr_renderer_autocreate(server->backend); server->renderer = wlr_renderer_autocreate(server->backend);
if (!server->renderer) { if (!server->renderer) {
wlr_log(WLR_ERROR, "unable to create renderer"); wlr_log(WLR_ERROR, "unable to create renderer");
@ -197,11 +199,13 @@ server_init(struct server *server)
wlr_renderer_init_wl_display(server->renderer, server->wl_display); wlr_renderer_init_wl_display(server->renderer, server->wl_display);
/* Autocreates an allocator for us. /*
* The allocator is the bridge between the renderer and the backend. It * Autocreates an allocator for us. The allocator is the bridge between
* handles the buffer creation, allowing wlroots to render onto the * the renderer and the backend. It handles the buffer creation,
* screen */ * allowing wlroots to render onto the screen
server->allocator = wlr_allocator_autocreate(server->backend, server->renderer); */
server->allocator = wlr_allocator_autocreate(
server->backend, server->renderer);
if (!server->allocator) { if (!server->allocator) {
wlr_log(WLR_ERROR, "unable to create allocator"); wlr_log(WLR_ERROR, "unable to create allocator");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);