aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-02-12 21:29:23 +0100
committeremersion <contact@emersion.fr>2018-02-12 21:29:23 +0100
commitc2e147401048aa53aebd52f1851b1da8c91043a3 (patch)
tree8ea1a2b6a0414fd7904824ffac330cd4e1e96ca2
parent36ead80cd19b4c1773b894750ecf7fcec63f9b9b (diff)
Reformat all #include directives
-rw-r--r--backend/backend.c16
-rw-r--r--backend/drm/atomic.c4
-rw-r--r--backend/drm/backend.c16
-rw-r--r--backend/drm/drm.c24
-rw-r--r--backend/drm/legacy.c2
-rw-r--r--backend/drm/properties.c2
-rw-r--r--backend/drm/renderer.c16
-rw-r--r--backend/drm/util.c8
-rw-r--r--backend/headless/backend.c6
-rw-r--r--backend/headless/input_device.c8
-rw-r--r--backend/headless/output.c4
-rw-r--r--backend/libinput/backend.c6
-rw-r--r--backend/libinput/events.c6
-rw-r--r--backend/libinput/keyboard.c6
-rw-r--r--backend/libinput/pointer.c6
-rw-r--r--backend/libinput/tablet_pad.c6
-rw-r--r--backend/libinput/tablet_tool.c6
-rw-r--r--backend/libinput/touch.c6
-rw-r--r--backend/meson.build6
-rw-r--r--backend/multi/backend.c4
-rw-r--r--backend/session/direct-freebsd.c20
-rw-r--r--backend/session/direct-ipc.c10
-rw-r--r--backend/session/direct.c18
-rw-r--r--backend/session/logind.c12
-rw-r--r--backend/session/session.c8
-rw-r--r--backend/wayland/backend.c14
-rw-r--r--backend/wayland/output.c10
-rw-r--r--backend/wayland/registry.c1
-rw-r--r--backend/wayland/wl_seat.c8
-rw-r--r--backend/x11/backend.c26
-rw-r--r--include/backend/drm/drm.h10
-rw-r--r--include/backend/drm/iface.h3
-rw-r--r--include/backend/drm/renderer.h6
-rw-r--r--include/backend/drm/util.h2
-rw-r--r--include/backend/headless.h2
-rw-r--r--include/backend/libinput.h3
-rw-r--r--include/backend/multi.h2
-rw-r--r--include/backend/wayland.h8
-rw-r--r--include/backend/x11.h8
-rw-r--r--include/render/gles2.h10
-rw-r--r--include/rootston/config.h7
-rw-r--r--include/rootston/cursor.h4
-rw-r--r--include/rootston/desktop.h21
-rw-r--r--include/rootston/input.h11
-rw-r--r--include/rootston/keyboard.h4
-rw-r--r--include/rootston/output.h6
-rw-r--r--include/rootston/seat.h5
-rw-r--r--include/rootston/server.h5
-rw-r--r--include/rootston/view.h4
-rw-r--r--include/rootston/xcursor.h4
-rw-r--r--include/util/os-compatibility.h7
-rw-r--r--include/util/signal.h4
-rw-r--r--include/wlr/backend/drm.h2
-rw-r--r--include/wlr/backend/libinput.h2
-rw-r--r--include/wlr/backend/multi.h5
-rw-r--r--include/wlr/backend/session.h4
-rw-r--r--include/wlr/backend/wayland.h2
-rw-r--r--include/wlr/interfaces/wlr_keyboard.h2
-rw-r--r--include/wlr/interfaces/wlr_output.h2
-rw-r--r--include/wlr/render.h2
-rw-r--r--include/wlr/render/egl.h6
-rw-r--r--include/wlr/render/gles2.h2
-rw-r--r--include/wlr/render/interface.h2
-rw-r--r--include/wlr/types/wlr_cursor.h6
-rw-r--r--include/wlr/types/wlr_keyboard.h4
-rw-r--r--include/wlr/types/wlr_list.h6
-rw-r--r--include/wlr/types/wlr_output.h4
-rw-r--r--include/wlr/types/wlr_output_damage.h2
-rw-r--r--include/wlr/types/wlr_output_layout.h4
-rw-r--r--include/wlr/types/wlr_pointer.h4
-rw-r--r--include/wlr/types/wlr_primary_selection.h2
-rw-r--r--include/wlr/types/wlr_screenshooter.h5
-rw-r--r--include/wlr/types/wlr_seat.h5
-rw-r--r--include/wlr/types/wlr_surface.h5
-rw-r--r--include/wlr/types/wlr_tablet_pad.h4
-rw-r--r--include/wlr/types/wlr_tablet_tool.h4
-rw-r--r--include/wlr/types/wlr_touch.h2
-rw-r--r--include/wlr/types/wlr_xdg_shell_v6.h2
-rw-r--r--include/wlr/xwayland.h2
-rw-r--r--include/wlr/xwm.h6
-rw-r--r--meson.build36
-rw-r--r--protocol/meson.build4
-rw-r--r--render/egl.c4
-rw-r--r--render/gles2/renderer.c6
-rw-r--r--render/gles2/shaders.c2
-rw-r--r--render/gles2/texture.c8
-rw-r--r--render/gles2/util.c4
-rw-r--r--render/matrix.c4
-rw-r--r--render/meson.build2
-rw-r--r--render/wlr_renderer.c2
-rw-r--r--render/wlr_texture.c2
-rw-r--r--rootston/config.c10
-rw-r--r--rootston/cursor.c10
-rw-r--r--rootston/desktop.c10
-rw-r--r--rootston/input.c4
-rw-r--r--rootston/keyboard.c8
-rw-r--r--rootston/main.c2
-rw-r--r--rootston/meson.build2
-rw-r--r--rootston/output.c14
-rw-r--r--rootston/seat.c8
-rw-r--r--rootston/wl_shell.c4
-rw-r--r--rootston/xdg_shell_v6.c4
-rw-r--r--rootston/xwayland.c4
-rw-r--r--types/meson.build4
-rw-r--r--types/wlr_box.c2
-rw-r--r--types/wlr_compositor.c6
-rw-r--r--types/wlr_cursor.c12
-rw-r--r--types/wlr_data_device.c6
-rw-r--r--types/wlr_gamma_control.c2
-rw-r--r--types/wlr_idle.c2
-rw-r--r--types/wlr_input_device.c6
-rw-r--r--types/wlr_keyboard.c4
-rw-r--r--types/wlr_list.c4
-rw-r--r--types/wlr_output.c6
-rw-r--r--types/wlr_output_damage.c6
-rw-r--r--types/wlr_output_layout.c10
-rw-r--r--types/wlr_pointer.c2
-rw-r--r--types/wlr_primary_selection.c6
-rw-r--r--types/wlr_region.c6
-rw-r--r--types/wlr_screenshooter.c4
-rw-r--r--types/wlr_seat.c6
-rw-r--r--types/wlr_server_decoration.c4
-rw-r--r--types/wlr_surface.c8
-rw-r--r--types/wlr_tablet_pad.c2
-rw-r--r--types/wlr_tablet_tool.c2
-rw-r--r--types/wlr_touch.c2
-rw-r--r--types/wlr_wl_shell.c8
-rw-r--r--types/wlr_xdg_shell_v6.c4
-rw-r--r--util/log.c2
-rw-r--r--util/os-compatibility.c10
-rw-r--r--util/region.c2
-rw-r--r--xcursor/meson.build2
-rw-r--r--xcursor/wlr_xcursor.c6
-rw-r--r--xcursor/xcursor.c4
-rw-r--r--xwayland/selection.c14
-rw-r--r--xwayland/sockets.c16
-rw-r--r--xwayland/xwayland.c16
-rw-r--r--xwayland/xwm.c16
138 files changed, 439 insertions, 446 deletions
diff --git a/backend/backend.c b/backend/backend.c
index aec5781e..c67be617 100644
--- a/backend/backend.c
+++ b/backend/backend.c
@@ -1,17 +1,17 @@
-#include <wayland-server.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
#include <assert.h>
+#include <errno.h>
#include <libinput.h>
-#include <wlr/backend/session.h>
-#include <wlr/backend/interface.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <wayland-server.h>
#include <wlr/backend/drm.h>
+#include <wlr/backend/interface.h>
#include <wlr/backend/libinput.h>
+#include <wlr/backend/multi.h>
+#include <wlr/backend/session.h>
#include <wlr/backend/wayland.h>
#include <wlr/backend/x11.h>
-#include <wlr/backend/multi.h>
#include <wlr/util/log.h>
void wlr_backend_init(struct wlr_backend *backend,
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c
index 526b2731..29b5ccb1 100644
--- a/backend/drm/atomic.c
+++ b/backend/drm/atomic.c
@@ -1,8 +1,8 @@
-#include <stdlib.h>
#include <gbm.h>
+#include <stdlib.h>
+#include <wlr/util/log.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
-#include <wlr/util/log.h>
#include "backend/drm/drm.h"
#include "backend/drm/iface.h"
#include "backend/drm/util.h"
diff --git a/backend/drm/backend.c b/backend/drm/backend.c
index 682e8c85..47dff227 100644
--- a/backend/drm/backend.c
+++ b/backend/drm/backend.c
@@ -1,19 +1,19 @@
-#include <unistd.h>
-#include <stdlib.h>
+#include <assert.h>
+#include <errno.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
-#include <errno.h>
-#include <assert.h>
+#include <unistd.h>
#include <wayland-server.h>
-#include <xf86drm.h>
-#include <wlr/backend/session.h>
#include <wlr/backend/interface.h>
+#include <wlr/backend/session.h>
#include <wlr/interfaces/wlr_output.h>
+#include <wlr/render/egl.h>
#include <wlr/types/wlr_list.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
-#include <wlr/render/egl.h>
+#include <xf86drm.h>
#include "backend/drm/drm.h"
+#include "util/signal.h"
static bool wlr_drm_backend_start(struct wlr_backend *backend) {
struct wlr_drm_backend *drm = (struct wlr_drm_backend *)backend;
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 5189ec90..e60b7e1c 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1,30 +1,30 @@
#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <inttypes.h>
-#include <errno.h>
-#include <time.h>
-#include <xf86drm.h>
-#include <xf86drmMode.h>
#include <drm_mode.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#include <errno.h>
#include <gbm.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
#include <wayland-server.h>
#include <wayland-util.h>
#include <wlr/backend/interface.h>
#include <wlr/interfaces/wlr_output.h>
-#include <wlr/util/log.h>
-#include "util/signal.h"
-#include <wlr/render/matrix.h>
-#include <wlr/render/gles2.h>
#include <wlr/render.h>
+#include <wlr/render/gles2.h>
+#include <wlr/render/matrix.h>
+#include <wlr/util/log.h>
+#include <xf86drm.h>
+#include <xf86drmMode.h>
#include "backend/drm/drm.h"
#include "backend/drm/iface.h"
#include "backend/drm/util.h"
+#include "util/signal.h"
bool wlr_drm_check_features(struct wlr_drm_backend *drm) {
if (drmSetClientCap(drm->fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1)) {
diff --git a/backend/drm/legacy.c b/backend/drm/legacy.c
index eec8c642..88a01b89 100644
--- a/backend/drm/legacy.c
+++ b/backend/drm/legacy.c
@@ -1,7 +1,7 @@
#include <gbm.h>
+#include <wlr/util/log.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
-#include <wlr/util/log.h>
#include "backend/drm/drm.h"
#include "backend/drm/iface.h"
#include "backend/drm/util.h"
diff --git a/backend/drm/properties.c b/backend/drm/properties.c
index 153e845e..3d35beb5 100644
--- a/backend/drm/properties.c
+++ b/backend/drm/properties.c
@@ -2,9 +2,9 @@
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
+#include <wlr/util/log.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
-#include <wlr/util/log.h>
#include "backend/drm/properties.h"
/*
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c
index 80d3bd9a..f3e570f7 100644
--- a/backend/drm/renderer.c
+++ b/backend/drm/renderer.c
@@ -1,18 +1,16 @@
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+#include <gbm.h>
+#include <GLES2/gl2.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
-
-#include <gbm.h>
-#include <GLES2/gl2.h>
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
#include <wayland-util.h>
-
-#include <wlr/util/log.h>
+#include <wlr/render.h>
#include <wlr/render/egl.h>
-#include <wlr/render/matrix.h>
#include <wlr/render/gles2.h>
-#include <wlr/render.h>
+#include <wlr/render/matrix.h>
+#include <wlr/util/log.h>
#include "backend/drm/drm.h"
#include "glapi.h"
diff --git a/backend/drm/util.c b/backend/drm/util.c
index 37d99aa8..41ba47d1 100644
--- a/backend/drm/util.c
+++ b/backend/drm/util.c
@@ -1,10 +1,10 @@
-#include <stdio.h>
-#include <string.h>
-#include <drm.h>
#include <drm_mode.h>
+#include <drm.h>
#include <gbm.h>
-#include "backend/drm/util.h"
+#include <stdio.h>
+#include <string.h>
#include <wlr/util/log.h>
+#include "backend/drm/util.h"
int32_t calculate_refresh_rate(drmModeModeInfo *mode) {
int32_t refresh = (mode->clock * 1000000LL / mode->htotal +
diff --git a/backend/headless/backend.c b/backend/headless/backend.c
index a79e4af8..663bc13b 100644
--- a/backend/headless/backend.c
+++ b/backend/headless/backend.c
@@ -1,10 +1,10 @@
+#include "util/signal.h"
#include <stdlib.h>
+#include <wlr/interfaces/wlr_input_device.h>
+#include <wlr/interfaces/wlr_output.h>
#include <wlr/render/egl.h>
#include <wlr/render/gles2.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
-#include <wlr/interfaces/wlr_output.h>
-#include <wlr/interfaces/wlr_input_device.h>
#include "backend/headless.h"
#include "glapi.h"
diff --git a/backend/headless/input_device.c b/backend/headless/input_device.c
index 5d7ca34b..ea335aff 100644
--- a/backend/headless/input_device.c
+++ b/backend/headless/input_device.c
@@ -1,13 +1,13 @@
#include <stdlib.h>
#include <wlr/interfaces/wlr_input_device.h>
-#include <wlr/interfaces/wlr_pointer.h>
#include <wlr/interfaces/wlr_keyboard.h>
-#include <wlr/interfaces/wlr_touch.h>
-#include <wlr/interfaces/wlr_tablet_tool.h>
+#include <wlr/interfaces/wlr_pointer.h>
#include <wlr/interfaces/wlr_tablet_pad.h>
+#include <wlr/interfaces/wlr_tablet_tool.h>
+#include <wlr/interfaces/wlr_touch.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "backend/headless.h"
+#include "util/signal.h"
static void input_device_destroy(struct wlr_input_device *wlr_dev) {
struct wlr_headless_input_device *device =
diff --git a/backend/headless/output.c b/backend/headless/output.c
index 63f0b6b4..ba4a094e 100644
--- a/backend/headless/output.c
+++ b/backend/headless/output.c
@@ -1,11 +1,11 @@
-#include <stdlib.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES2/gl2.h>
+#include <stdlib.h>
#include <wlr/interfaces/wlr_output.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "backend/headless.h"
+#include "util/signal.h"
static EGLSurface egl_create_surface(struct wlr_egl *egl, unsigned int width,
unsigned int height) {
diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c
index 1ec73009..71fe0d93 100644
--- a/backend/libinput/backend.c
+++ b/backend/libinput/backend.c
@@ -1,11 +1,11 @@
-#include <stdlib.h>
#include <assert.h>
#include <libinput.h>
-#include <wlr/backend/session.h>
+#include <stdlib.h>
#include <wlr/backend/interface.h>
+#include <wlr/backend/session.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "backend/libinput.h"
+#include "util/signal.h"
static int wlr_libinput_open_restricted(const char *path,
int flags, void *_backend) {
diff --git a/backend/libinput/events.c b/backend/libinput/events.c
index 248b8213..603eed07 100644
--- a/backend/libinput/events.c
+++ b/backend/libinput/events.c
@@ -1,12 +1,12 @@
-#include <stdlib.h>
#include <assert.h>
#include <libinput.h>
+#include <stdlib.h>
+#include <wayland-util.h>
#include <wlr/backend/session.h>
#include <wlr/interfaces/wlr_input_device.h>
#include <wlr/util/log.h>
-#include <wayland-util.h>
-#include "util/signal.h"
#include "backend/libinput.h"
+#include "util/signal.h"
struct wlr_input_device *get_appropriate_device(
enum wlr_input_device_type desired_type,
diff --git a/backend/libinput/keyboard.c b/backend/libinput/keyboard.c
index 065d8ead..b44bc892 100644
--- a/backend/libinput/keyboard.c
+++ b/backend/libinput/keyboard.c
@@ -1,9 +1,9 @@
-#include <stdlib.h>
#include <assert.h>
#include <libinput.h>
+#include <stdlib.h>
#include <wlr/backend/session.h>
-#include <wlr/types/wlr_input_device.h>
#include <wlr/interfaces/wlr_keyboard.h>
+#include <wlr/types/wlr_input_device.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
@@ -57,7 +57,7 @@ void handle_keyboard_key(struct libinput_event *event,
wlr_event.time_msec =
usec_to_msec(libinput_event_keyboard_get_time_usec(kbevent));
wlr_event.keycode = libinput_event_keyboard_get_key(kbevent);
- enum libinput_key_state state =
+ enum libinput_key_state state =
libinput_event_keyboard_get_key_state(kbevent);
switch (state) {
case LIBINPUT_KEY_STATE_RELEASED:
diff --git a/backend/libinput/pointer.c b/backend/libinput/pointer.c
index 560e95b5..8a31d312 100644
--- a/backend/libinput/pointer.c
+++ b/backend/libinput/pointer.c
@@ -1,12 +1,12 @@
-#include <stdlib.h>
#include <assert.h>
#include <libinput.h>
+#include <stdlib.h>
#include <wlr/backend/session.h>
-#include <wlr/types/wlr_input_device.h>
#include <wlr/interfaces/wlr_pointer.h>
+#include <wlr/types/wlr_input_device.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "backend/libinput.h"
+#include "util/signal.h"
struct wlr_pointer *wlr_libinput_pointer_create(
struct libinput_device *libinput_dev) {
diff --git a/backend/libinput/tablet_pad.c b/backend/libinput/tablet_pad.c
index e8ffc6dd..70e4c677 100644
--- a/backend/libinput/tablet_pad.c
+++ b/backend/libinput/tablet_pad.c
@@ -1,12 +1,12 @@
-#include <stdlib.h>
#include <assert.h>
#include <libinput.h>
+#include <stdlib.h>
#include <wlr/backend/session.h>
-#include <wlr/types/wlr_input_device.h>
#include <wlr/interfaces/wlr_tablet_pad.h>
+#include <wlr/types/wlr_input_device.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "backend/libinput.h"
+#include "util/signal.h"
struct wlr_tablet_pad *wlr_libinput_tablet_pad_create(
struct libinput_device *libinput_dev) {
diff --git a/backend/libinput/tablet_tool.c b/backend/libinput/tablet_tool.c
index 0f2ea70a..4e60367f 100644
--- a/backend/libinput/tablet_tool.c
+++ b/backend/libinput/tablet_tool.c
@@ -1,12 +1,12 @@
-#include <stdlib.h>
#include <assert.h>
#include <libinput.h>
+#include <stdlib.h>
#include <wlr/backend/session.h>
-#include <wlr/types/wlr_input_device.h>
#include <wlr/interfaces/wlr_tablet_tool.h>
+#include <wlr/types/wlr_input_device.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "backend/libinput.h"
+#include "util/signal.h"
struct wlr_tablet_tool *wlr_libinput_tablet_tool_create(
struct libinput_device *libinput_dev) {
diff --git a/backend/libinput/touch.c b/backend/libinput/touch.c
index fb2b8e3f..2b87f9cd 100644
--- a/backend/libinput/touch.c
+++ b/backend/libinput/touch.c
@@ -1,12 +1,12 @@
-#include <stdlib.h>
#include <assert.h>
#include <libinput.h>
+#include <stdlib.h>
#include <wlr/backend/session.h>
-#include <wlr/types/wlr_input_device.h>
#include <wlr/interfaces/wlr_touch.h>
+#include <wlr/types/wlr_input_device.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "backend/libinput.h"
+#include "util/signal.h"
struct wlr_touch *wlr_libinput_touch_create(
struct libinput_device *libinput_dev) {
diff --git a/backend/meson.build b/backend/meson.build
index beb3841c..bac43063 100644
--- a/backend/meson.build
+++ b/backend/meson.build
@@ -1,7 +1,5 @@
backend_files = files(
'backend.c',
- 'session/direct-ipc.c',
- 'session/session.c',
'drm/atomic.c',
'drm/backend.c',
'drm/drm.c',
@@ -10,8 +8,8 @@ backend_files = files(
'drm/renderer.c',
'drm/util.c',
'headless/backend.c',
- 'headless/output.c',
'headless/input_device.c',
+ 'headless/output.c',
'libinput/backend.c',
'libinput/events.c',
'libinput/keyboard.c',
@@ -20,6 +18,8 @@ backend_files = files(
'libinput/tablet_tool.c',
'libinput/touch.c',
'multi/backend.c',
+ 'session/direct-ipc.c',
+ 'session/session.c',
'wayland/backend.c',
'wayland/output.c',
'wayland/registry.c',
diff --git a/backend/multi/backend.c b/backend/multi/backend.c
index 1005e6b7..5cb3fbc5 100644
--- a/backend/multi/backend.c
+++ b/backend/multi/backend.c
@@ -4,9 +4,9 @@
#include <wlr/backend/interface.h>
#include <wlr/backend/session.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
-#include "backend/multi.h"
#include "backend/drm/drm.h"
+#include "backend/multi.h"
+#include "util/signal.h"
struct subbackend_state {
struct wlr_backend *backend;
diff --git a/backend/session/direct-freebsd.c b/backend/session/direct-freebsd.c
index ceaae2be..6e23bf1b 100644
--- a/backend/session/direct-freebsd.c
+++ b/backend/session/direct-freebsd.c
@@ -1,22 +1,22 @@
+#include <dev/evdev/input.h>
#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdbool.h>
-#include <unistd.h>
+#include <fcntl.h>
#include <signal.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/consio.h>
#include <sys/ioctl.h>
+#include <sys/kbio.h>
#include <sys/stat.h>
-#include <termios.h>
-#include <fcntl.h>
#include <sys/types.h>
-#include <dev/evdev/input.h>
-#include <sys/kbio.h>
-#include <sys/consio.h>
+#include <termios.h>
+#include <unistd.h>
#include <wayland-server.h>
#include <wlr/backend/session/interface.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "backend/session/direct-ipc.h"
+#include "util/signal.h"
const struct session_impl session_direct;
diff --git a/backend/session/direct-ipc.c b/backend/session/direct-ipc.c
index e7a169fa..6c69b70a 100644
--- a/backend/session/direct-ipc.c
+++ b/backend/session/direct-ipc.c
@@ -4,22 +4,22 @@
#define INPUT_MAJOR 0
#endif
#include <errno.h>
+#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
+#include <unistd.h>
+#include <wlr/config.h>
+#include <wlr/util/log.h>
+#include <xf86drm.h>
#ifdef __linux__
#include <sys/sysmacros.h>
#include <linux/major.h>
#endif
-#include <xf86drm.h>
-#include <wlr/config.h>
-#include <wlr/util/log.h>
#include "backend/session/direct-ipc.h"
enum { DRM_MAJOR = 226 };
diff --git a/backend/session/direct.c b/backend/session/direct.c
index 1f60ed23..13a26d99 100644
--- a/backend/session/direct.c
+++ b/backend/session/direct.c
@@ -1,22 +1,22 @@
#define _POSIX_C_SOURCE 200809L
#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdbool.h>
-#include <unistd.h>
+#include <linux/input.h>
+#include <linux/kd.h>
+#include <linux/major.h>
+#include <linux/vt.h>
#include <signal.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
-#include <linux/kd.h>
-#include <linux/major.h>
-#include <linux/input.h>
-#include <linux/vt.h>
+#include <unistd.h>
#include <wayland-server.h>
#include <wlr/backend/session/interface.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "backend/session/direct-ipc.h"
+#include "util/signal.h"
enum { DRM_MAJOR = 226 };
diff --git a/backend/session/logind.c b/backend/session/logind.c
index b2206e15..f0ac1e93 100644
--- a/backend/session/logind.c
+++ b/backend/session/logind.c
@@ -1,17 +1,17 @@
#define _POSIX_C_SOURCE 200809L
#include <assert.h>
-#include <stdio.h>
+#include <errno.h>
+#include <fcntl.h>
#include <stdbool.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/sysmacros.h>
#include <sys/stat.h>
-#include <fcntl.h>
+#include <sys/sysmacros.h>
+#include <unistd.h>
#include <wayland-server.h>
-#include <wlr/config.h>
#include <wlr/backend/session/interface.h>
+#include <wlr/config.h>
#include <wlr/util/log.h>
#include "util/signal.h"
diff --git a/backend/session/session.c b/backend/session/session.c
index ac55a191..2d5d9776 100644
--- a/backend/session/session.c
+++ b/backend/session/session.c
@@ -1,18 +1,18 @@
#define _POSIX_C_SOURCE 200809L
#include <assert.h>
+#include <libudev.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <libudev.h>
#include <wayland-server.h>
-#include <xf86drm.h>
-#include <xf86drmMode.h>
-#include <wlr/config.h>
#include <wlr/backend/session.h>
#include <wlr/backend/session/interface.h>
+#include <wlr/config.h>
#include <wlr/util/log.h>
+#include <xf86drm.h>
+#include <xf86drmMode.h>
#include "util/signal.h"
extern const struct session_impl session_logind;
diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c
index 60c8ede9..abb25df5 100644
--- a/backend/wayland/backend.c
+++ b/backend/wayland/backend.c
@@ -1,18 +1,18 @@
-#include <stdlib.h>
-#include <stdint.h>
#include <assert.h>
-#include <limits.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#include <limits.h>
+#include <stdint.h>
+#include <stdlib.h>
#include <wayland-server.h>
-#include <wlr/render/egl.h>
-#include <wlr/render/gles2.h>
#include <wlr/backend/interface.h>
-#include <wlr/interfaces/wlr_output.h>
#include <wlr/interfaces/wlr_input_device.h>
+#include <wlr/interfaces/wlr_output.h>
+#include <wlr/render/egl.h>
+#include <wlr/render/gles2.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "backend/wayland.h"
+#include "util/signal.h"
#include "xdg-shell-unstable-v6-client-protocol.h"
static int dispatch_events(int fd, uint32_t mask, void *data) {
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
index fed4c63a..fc40dea0 100644
--- a/backend/wayland/output.c
+++ b/backend/wayland/output.c
@@ -1,17 +1,17 @@
-#include <stdio.h>
#include <assert.h>
+#include <GLES2/gl2.h>
#include <stdint.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
-#include <sys/types.h>
#include <sys/mman.h>
+#include <sys/types.h>
+#include <unistd.h>
#include <wayland-client.h>
-#include <GLES2/gl2.h>
#include <wlr/interfaces/wlr_output.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "backend/wayland.h"
+#include "util/signal.h"
#include "xdg-shell-unstable-v6-client-protocol.h"
int os_create_anonymous_file(off_t size);
diff --git a/backend/wayland/registry.c b/backend/wayland/registry.c
index 0dec0ec5..4aa39f09 100644
--- a/backend/wayland/registry.c
+++ b/backend/wayland/registry.c
@@ -6,7 +6,6 @@
#include "backend/wayland.h"
#include "xdg-shell-unstable-v6-client-protocol.h"
-
static void xdg_shell_handle_ping(void *data, struct zxdg_shell_v6 *shell,
uint32_t serial) {
zxdg_shell_v6_pong(shell, serial);
diff --git a/backend/wayland/wl_seat.c b/backend/wayland/wl_seat.c
index f6328106..b1f7cff6 100644
--- a/backend/wayland/wl_seat.c
+++ b/backend/wayland/wl_seat.c
@@ -1,17 +1,17 @@
#define _XOPEN_SOURCE 500
#include <assert.h>
-#include <stdlib.h>
#include <stdint.h>
+#include <stdlib.h>
#include <string.h>
#include <wayland-client.h>
-#include <wlr/interfaces/wlr_output.h>
#include <wlr/interfaces/wlr_input_device.h>
-#include <wlr/interfaces/wlr_pointer.h>
#include <wlr/interfaces/wlr_keyboard.h>
+#include <wlr/interfaces/wlr_output.h>
+#include <wlr/interfaces/wlr_pointer.h>
#include <wlr/interfaces/wlr_touch.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "backend/wayland.h"
+#include "util/signal.h"
static void pointer_handle_enter(void *data, struct wl_pointer *wl_pointer,
uint32_t serial, struct wl_surface *surface, wl_fixed_t surface_x,
diff --git a/backend/x11/backend.c b/backend/x11/backend.c
index 2715b366..28a4fcac 100644
--- a/backend/x11/backend.c
+++ b/backend/x11/backend.c
@@ -1,29 +1,29 @@
#define _POSIX_C_SOURCE 200112L
+#include <EGL/egl.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
-#include <EGL/egl.h>
#include <wayland-server.h>
-#include <xcb/xcb.h>
-#include <xcb/glx.h>
-#include <X11/Xlib-xcb.h>
-#ifdef __linux__
-#include <linux/input-event-codes.h>
-#elif __FreeBSD__
-#include <dev/evdev/input-event-codes.h>
-#endif
#include <wlr/backend/interface.h>
#include <wlr/backend/x11.h>
-#include <wlr/render/egl.h>
-#include <wlr/render/gles2.h>
-#include <wlr/interfaces/wlr_output.h>
#include <wlr/interfaces/wlr_input_device.h>
#include <wlr/interfaces/wlr_keyboard.h>
+#include <wlr/interfaces/wlr_output.h>
#include <wlr/interfaces/wlr_pointer.h>
+#include <wlr/render/egl.h>
+#include <wlr/render/gles2.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
+#include <X11/Xlib-xcb.h>
+#include <xcb/glx.h>
+#include <xcb/xcb.h>
+#ifdef __linux__
+#include <linux/input-event-codes.h>
+#elif __FreeBSD__
+#include <dev/evdev/input-event-codes.h>
+#endif
#include "backend/x11.h"
+#include "util/signal.h"
static struct wlr_backend_impl backend_impl;
static struct wlr_output_impl output_impl;
diff --git a/include/backend/drm/drm.h b/include/backend/drm/drm.h
index 12530da6..65db04ef 100644
--- a/include/backend/drm/drm.h
+++ b/include/backend/drm/drm.h
@@ -1,19 +1,17 @@
#ifndef BACKEND_DRM_DRM_H
#define BACKEND_DRM_DRM_H
+#include <EGL/egl.h>
+#include <gbm.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <wayland-server.h>
-#include <xf86drmMode.h>
-#include <EGL/egl.h>
-#include <gbm.h>
#include <wayland-util.h>
-
-#include <wlr/backend/session.h>
#include <wlr/backend/drm.h>
+#include <wlr/backend/session.h>
#include <wlr/render/egl.h>
-
+#include <xf86drmMode.h>
#include "iface.h"
#include "properties.h"
#include "renderer.h"
diff --git a/include/backend/drm/iface.h b/include/backend/drm/iface.h
index 15cdf1ab..ef0e7bf8 100644
--- a/include/backend/drm/iface.h
+++ b/include/backend/drm/iface.h
@@ -1,10 +1,9 @@
#ifndef BACKEND_DRM_IFACE_H
#define BACKEND_DRM_IFACE_H
+#include <gbm.h>
#include <stdbool.h>
#include <stdint.h>
-
-#include <gbm.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
diff --git a/include/backend/drm/renderer.h b/include/backend/drm/renderer.h
index bf0165bc..a56a8673 100644
--- a/include/backend/drm/renderer.h
+++ b/include/backend/drm/renderer.h
@@ -1,12 +1,10 @@
#ifndef BACKEND_DRM_RENDERER_H
#define BACKEND_DRM_RENDERER_H
-#include <stdbool.h>
-#include <stdint.h>
-
#include <EGL/egl.h>
#include <gbm.h>
-
+#include <stdbool.h>
+#include <stdint.h>
#include <wlr/render.h>
struct wlr_drm_backend;
diff --git a/include/backend/drm/util.h b/include/backend/drm/util.h
index 6818b4db..25da858f 100644
--- a/include/backend/drm/util.h
+++ b/include/backend/drm/util.h
@@ -2,9 +2,9 @@
#define BACKEND_DRM_UTIL_H
#include <stdint.h>
+#include <wlr/types/wlr_output.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
-#include <wlr/types/wlr_output.h>
// Calculates a more accurate refresh rate (mHz) than what mode itself provides
int32_t calculate_refresh_rate(drmModeModeInfo *mode);
diff --git a/include/backend/headless.h b/include/backend/headless.h
index f9805bcc..e130bae1 100644
--- a/include/backend/headless.h
+++ b/include/backend/headless.h
@@ -1,8 +1,8 @@
#ifndef BACKEND_HEADLESS_H
#define BACKEND_HEADLESS_H
-#include <wlr/backend/interface.h>
#include <wlr/backend/headless.h>
+#include <wlr/backend/interface.h>
struct wlr_headless_backend {
struct wlr_backend backend;
diff --git a/include/backend/libinput.h b/include/backend/libinput.h
index 6ec718c6..f828c310 100644
--- a/include/backend/libinput.h
+++ b/include/backend/libinput.h
@@ -1,10 +1,11 @@
#ifndef BACKEND_LIBINPUT_H
#define BACKEND_LIBINPUT_H
+
#include <libinput.h>
#include <wayland-server-core.h>
-#include <wlr/types/wlr_input_device.h>
#include <wlr/backend/interface.h>
#include <wlr/interfaces/wlr_input_device.h>
+#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_list.h>
struct wlr_libinput_backend {
diff --git a/include/backend/multi.h b/include/backend/multi.h
index 3363c608..c57c48f3 100644
--- a/include/backend/multi.h
+++ b/include/backend/multi.h
@@ -1,10 +1,10 @@
#ifndef BACKEND_MULTI_H
#define BACKEND_MULTI_H
+#include <wayland-util.h>
#include <wlr/backend/interface.h>
#include <wlr/backend/multi.h>
#include <wlr/backend/session.h>
-#include <wayland-util.h>
struct wlr_multi_backend {
struct wlr_backend backend;
diff --git a/include/backend/wayland.h b/include/backend/wayland.h
index 78a88f29..16c8e13b 100644
--- a/include/backend/wayland.h
+++ b/include/backend/wayland.h
@@ -3,13 +3,13 @@
#include <stdbool.h>
#include <wayland-client.h>
-#include <wayland-server.h>
#include <wayland-egl.h>
-#include <wlr/render/egl.h>
-#include <wlr/render.h>
+#include <wayland-server.h>
+#include <wayland-util.h>
#include <wlr/backend/wayland.h>
+#include <wlr/render.h>
+#include <wlr/render/egl.h>
#include <wlr/types/wlr_box.h>
-#include <wayland-util.h>
struct wlr_wl_backend {
struct wlr_backend backend;
diff --git a/include/backend/x11.h b/include/backend/x11.h
index fee39eac..c5f258c0 100644
--- a/include/backend/x11.h
+++ b/include/backend/x11.h
@@ -1,11 +1,11 @@
-#ifndef WLR_X11_H
-#define WLR_X11_H
+#ifndef BACKEND_X11_H
+#define BACKEND_X11_H
#include <stdbool.h>
-#include <xcb/xcb.h>
-#include <X11/Xlib-xcb.h>
#include <wayland-server.h>
#include <wlr/render/egl.h>
+#include <X11/Xlib-xcb.h>
+#include <xcb/xcb.h>
struct wlr_x11_backend;
diff --git a/include/render/gles2.h b/include/render/gles2.h
index 0b7032cc..797c5293 100644
--- a/include/render/gles2.h
+++ b/include/render/gles2.h
@@ -1,13 +1,13 @@
#ifndef RENDER_GLES2_H
#define RENDER_GLES2_H
-#include <stdint.h>
-#include <string.h>
-#include <stdbool.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
#include <wlr/backend.h>
#include <wlr/render.h>
#include <wlr/render/egl.h>
diff --git a/include/rootston/config.h b/include/rootston/config.h
index 05f23b75..9926d9c2 100644
--- a/include/rootston/config.h
+++ b/include/rootston/config.h
@@ -1,7 +1,8 @@
-#ifndef _ROOTSTON_CONFIG_H
-#define _ROOTSTON_CONFIG_H
-#include <wlr/types/wlr_output_layout.h>
+#ifndef ROOTSTON_CONFIG_H
+#define ROOTSTON_CONFIG_H
+
#include <wlr/types/wlr_input_device.h>
+#include <wlr/types/wlr_output_layout.h>
#define ROOTS_CONFIG_DEFAULT_SEAT_NAME "seat0"
diff --git a/include/rootston/cursor.h b/include/rootston/cursor.h
index 90d54c12..a1a466c2 100644
--- a/include/rootston/cursor.h
+++ b/include/rootston/cursor.h
@@ -1,5 +1,5 @@
-#ifndef _ROOTSTON_CURSOR_H
-#define _ROOTSTON_CURSOR_H
+#ifndef ROOTSTON_CURSOR_H
+#define ROOTSTON_CURSOR_H
#include "rootston/seat.h"
diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h
index a2121701..6572b242 100644
--- a/include/rootston/desktop.h
+++ b/include/rootston/desktop.h
@@ -1,22 +1,23 @@
-#ifndef _ROOTSTON_DESKTOP_H
-#define _ROOTSTON_DESKTOP_H
+#ifndef ROOTSTON_DESKTOP_H
+#define ROOTSTON_DESKTOP_H
+
#include <time.h>
#include <wayland-server.h>
#include <wlr/config.h>
-#include <wlr/types/wlr_output.h>
-#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_compositor.h>
-#include <wlr/types/wlr_wl_shell.h>
-#include <wlr/types/wlr_xdg_shell_v6.h>
-#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/types/wlr_gamma_control.h>
+#include <wlr/types/wlr_idle.h>
+#include <wlr/types/wlr_list.h>
+#include <wlr/types/wlr_output_layout.h>
+#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_primary_selection.h>
#include <wlr/types/wlr_screenshooter.h>
-#include <wlr/types/wlr_list.h>
-#include <wlr/types/wlr_idle.h>
-#include "rootston/view.h"
+#include <wlr/types/wlr_wl_shell.h>
+#include <wlr/types/wlr_xcursor_manager.h>
+#include <wlr/types/wlr_xdg_shell_v6.h>
#include "rootston/config.h"
#include "rootston/output.h"
+#include "rootston/view.h"
struct roots_desktop {
struct wl_list views; // roots_view::link
diff --git a/include/rootston/input.h b/include/rootston/input.h
index d05cbb0a..4395a0f7 100644
--- a/include/rootston/input.h
+++ b/include/rootston/input.h
@@ -1,13 +1,14 @@
-#ifndef _ROOTSTON_INPUT_H
-#define _ROOTSTON_INPUT_H
+#ifndef ROOTSTON_INPUT_H
+#define ROOTSTON_INPUT_H
+
#include <wayland-server.h>
-#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_cursor.h>
+#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_seat.h>
-#include "rootston/cursor.h"
#include "rootston/config.h"
-#include "rootston/view.h"
+#include "rootston/cursor.h"
#include "rootston/server.h"
+#include "rootston/view.h"
struct roots_input {
struct roots_config *config;
diff --git a/include/rootston/keyboard.h b/include/rootston/keyboard.h
index 4548f4a7..0140389a 100644
--- a/include/rootston/keyboard.h
+++ b/include/rootston/keyboard.h
@@ -1,5 +1,5 @@
-#ifndef _ROOTSTON_KEYBOARD_H
-#define _ROOTSTON_KEYBOARD_H
+#ifndef ROOTSTON_KEYBOARD_H
+#define ROOTSTON_KEYBOARD_H
#include <xkbcommon/xkbcommon.h>
#include "rootston/input.h"
diff --git a/include/rootston/output.h b/include/rootston/output.h
index 8396e7c5..9682e4f5 100644
--- a/include/rootston/output.h
+++ b/include/rootston/output.h
@@ -1,8 +1,8 @@
-#ifndef _ROOTSTON_OUTPUT_H
-#define _ROOTSTON_OUTPUT_H
+#ifndef ROOTSTON_OUTPUT_H
+#define ROOTSTON_OUTPUT_H
-#include <time.h>
#include <pixman.h>
+#include <time.h>
#include <wayland-server.h>
#include <wlr/types/wlr_output_damage.h>
diff --git a/include/rootston/seat.h b/include/rootston/seat.h
index cd819076..cc0293b5 100644
--- a/include/rootston/seat.h
+++ b/include/rootston/seat.h
@@ -1,5 +1,6 @@
-#ifndef _ROOTSTON_SEAT_H
-#define _ROOTSTON_SEAT_H
+#ifndef ROOTSTON_SEAT_H
+#define ROOTSTON_SEAT_H
+
#include <wayland-server.h>
#include "rootston/input.h"
#include "rootston/keyboard.h"
diff --git a/include/rootston/server.h b/include/rootston/server.h
index 0c26ea92..5f35dd90 100644
--- a/include/rootston/server.h
+++ b/include/rootston/server.h
@@ -1,11 +1,12 @@
#ifndef _ROOTSTON_SERVER_H
#define _ROOTSTON_SERVER_H
+
#include <wayland-server.h>
-#include <wlr/config.h>
#include <wlr/backend.h>
#include <wlr/backend/session.h>
-#include <wlr/types/wlr_data_device.h>
+#include <wlr/config.h>
#include <wlr/render.h>
+#include <wlr/types/wlr_data_device.h>
#ifdef WLR_HAS_XWAYLAND
#include <wlr/xwayland.h>
#endif
diff --git a/include/rootston/view.h b/include/rootston/view.h
index f6968c7a..b61ac330 100644
--- a/include/rootston/view.h
+++ b/include/rootston/view.h
@@ -1,5 +1,5 @@
-#ifndef _ROOTSTON_VIEW_H
-#define _ROOTSTON_VIEW_H
+#ifndef ROOTSTON_VIEW_H
+#define ROOTSTON_VIEW_H
#include <stdbool.h>
#include <wlr/config.h>
diff --git a/include/rootston/xcursor.h b/include/rootston/xcursor.h
index a7d2b960..f78489a4 100644
--- a/include/rootston/xcursor.h
+++ b/include/rootston/xcursor.h
@@ -1,5 +1,5 @@
-#ifndef _ROOTSTON_XCURSOR_H
-#define _ROOTSTON_XCURSOR_H
+#ifndef ROOTSTON_XCURSOR_H
+#define ROOTSTON_XCURSOR_H
#include <stdint.h>
diff --git a/include/util/os-compatibility.h b/include/util/os-compatibility.h
index b2ec2db9..2038025e 100644
--- a/include/util/os-compatibility.h
+++ b/include/util/os-compatibility.h
@@ -1,12 +1,9 @@
-#ifndef _WLR_UTIL_OS_COMPATIBILITY_H
-#define _WLR_UTIL_OS_COMPATIBILITY_H
+#ifndef UTIL_OS_COMPATIBILITY_H
+#define UTIL_OS_COMPATIBILITY_H
int os_fd_set_cloexec(int fd);
-
int set_cloexec_or_close(int fd);
-
int create_tmpfile_cloexec(char *tmpname);
-
int os_create_anonymous_file(off_t size);
#endif
diff --git a/include/util/signal.h b/include/util/signal.h
index e13141d8..cc6cb525 100644
--- a/include/util/signal.h
+++ b/include/util/signal.h
@@ -1,5 +1,5 @@
-#ifndef WLR_UTIL_SIGNAL_H
-#define WLR_UTIL_SIGNAL_H
+#ifndef UTIL_SIGNAL_H
+#define UTIL_SIGNAL_H
#include <wayland-server.h>
diff --git a/include/wlr/backend/drm.h b/include/wlr/backend/drm.h
index 133e4f69..90460647 100644
--- a/include/wlr/backend/drm.h
+++ b/include/wlr/backend/drm.h
@@ -2,8 +2,8 @@
#define WLR_BACKEND_DRM_H
#include <wayland-server.h>
-#include <wlr/backend/session.h>
#include <wlr/backend.h>
+#include <wlr/backend/session.h>
#include <wlr/types/wlr_output.h>
struct wlr_backend *wlr_drm_backend_create(struct wl_display *display,
diff --git a/include/wlr/backend/libinput.h b/include/wlr/backend/libinput.h
index af873628..c7cfe894 100644
--- a/include/wlr/backend/libinput.h
+++ b/include/wlr/backend/libinput.h
@@ -3,8 +3,8 @@
#include <libinput.h>
#include <wayland-server.h>
-#include <wlr/backend/session.h>
#include <wlr/backend.h>
+#include <wlr/backend/session.h>
#include <wlr/types/wlr_input_device.h>
struct wlr_backend *wlr_libinput_backend_create(struct wl_display *display,
diff --git a/include/wlr/backend/multi.h b/include/wlr/backend/multi.h
index d9914efc..2dee7403 100644
--- a/include/wlr/backend/multi.h
+++ b/include/wlr/backend/multi.h
@@ -5,17 +5,12 @@
#include <wlr/backend/session.h>
struct wlr_backend *wlr_multi_backend_create(struct wl_display *display);
-
void wlr_multi_backend_add(struct wlr_backend *multi,
struct wlr_backend *backend);
-
void wlr_multi_backend_remove(struct wlr_backend *multi,
struct wlr_backend *backend);
-
bool wlr_backend_is_multi(struct wlr_backend *backend);
-
struct wlr_session *wlr_multi_get_session(struct wlr_backend *base);
-
bool wlr_multi_is_empty(struct wlr_backend *backend);
#endif
diff --git a/include/wlr/backend/session.h b/include/wlr/backend/session.h
index 3242a13f..7ff9691f 100644
--- a/include/wlr/backend/session.h
+++ b/include/wlr/backend/session.h
@@ -1,10 +1,10 @@
#ifndef WLR_BACKEND_SESSION_H
#define WLR_BACKEND_SESSION_H
-#include <stdbool.h>
-#include <wayland-server.h>
#include <libudev.h>
+#include <stdbool.h>
#include <sys/types.h>
+#include <wayland-server.h>
struct session_impl;
diff --git a/include/wlr/backend/wayland.h b/include/wlr/backend/wayland.h
index f89a6383..e28ffff5 100644
--- a/include/wlr/backend/wayland.h
+++ b/include/wlr/backend/wayland.h
@@ -1,12 +1,12 @@
#ifndef WLR_BACKEND_WAYLAND_H
#define WLR_BACKEND_WAYLAND_H
+#include <stdbool.h>
#include <wayland-client.h>
#include <wayland-server.h>
#include <wlr/backend.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_output.h>
-#include <stdbool.h>
/**
* Creates a new wlr_wl_backend. This backend will be created with no outputs;
diff --git a/include/wlr/interfaces/wlr_keyboard.h b/include/wlr/interfaces/wlr_keyboard.h
index 570f5721..6960ea87 100644
--- a/include/wlr/interfaces/wlr_keyboard.h
+++ b/include/wlr/interfaces/wlr_keyboard.h
@@ -1,8 +1,8 @@
#ifndef WLR_INTERFACES_WLR_KEYBOARD_H
#define WLR_INTERFACES_WLR_KEYBOARD_H
-#include <wlr/types/wlr_keyboard.h>
#include <stdint.h>
+#include <wlr/types/wlr_keyboard.h>
struct wlr_keyboard_impl {
void (*destroy)(struct wlr_keyboard *keyboard);
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h
index a01f8901..5edd1ae1 100644
--- a/include/wlr/interfaces/wlr_output.h
+++ b/include/wlr/interfaces/wlr_output.h
@@ -2,9 +2,9 @@
#define WLR_INTERFACES_WLR_OUTPUT_H
#include <stdbool.h>
+#include <wlr/backend.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h>
-#include <wlr/backend.h>
struct wlr_output_impl {
void (*enable)(struct wlr_output *output, bool enable);
diff --git a/include/wlr/render.h b/include/wlr/render.h
index ccc66d36..3743482b 100644
--- a/include/wlr/render.h
+++ b/include/wlr/render.h
@@ -1,9 +1,9 @@
#ifndef WLR_RENDER_H
#define WLR_RENDER_H
-#include <stdint.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#include <stdint.h>
#include <wayland-server-protocol.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h>
diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h
index 1facc6b8..97a28016 100644
--- a/include/wlr/render/egl.h
+++ b/include/wlr/render/egl.h
@@ -1,10 +1,10 @@
-#ifndef WLR_EGL_H
-#define WLR_EGL_H
+#ifndef WLR_RENDER_EGL_H
+#define WLR_RENDER_EGL_H
-#include <stdbool.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <pixman.h>
+#include <stdbool.h>
#include <wayland-server.h>
struct wlr_egl {
diff --git a/include/wlr/render/gles2.h b/include/wlr/render/gles2.h
index 25e760d5..a924a065 100644
--- a/include/wlr/render/gles2.h
+++ b/include/wlr/render/gles2.h
@@ -1,8 +1,8 @@
#ifndef WLR_RENDER_GLES2_H
#define WLR_RENDER_GLES2_H
-#include <wlr/render.h>
#include <wlr/backend.h>
+#include <wlr/render.h>
struct wlr_egl;
struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_backend *backend);
diff --git a/include/wlr/render/interface.h b/include/wlr/render/interface.h
index b8e99898..b989e399 100644
--- a/include/wlr/render/interface.h
+++ b/include/wlr/render/interface.h
@@ -1,10 +1,10 @@
#ifndef WLR_RENDER_INTERFACE_H
#define WLR_RENDER_INTERFACE_H
-#include <wayland-server-protocol.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <stdbool.h>
+#include <wayland-server-protocol.h>
#include <wlr/render.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h>
diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h
index e072ca05..da010972 100644
--- a/include/wlr/types/wlr_cursor.h
+++ b/include/wlr/types/wlr_cursor.h
@@ -2,10 +2,10 @@
#define WLR_TYPES_WLR_CURSOR_H
#include <wayland-server.h>
-#include <wlr/types/wlr_output.h>
-#include <wlr/types/wlr_output_layout.h>
-#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_box.h>
+#include <wlr/types/wlr_input_device.h>
+#include <wlr/types/wlr_output_layout.h>
+#include <wlr/types/wlr_output.h>
struct wlr_cursor_state;
diff --git a/include/wlr/types/wlr_keyboard.h b/include/wlr/types/wlr_keyboard.h
index c67cc4c2..ed0427e8 100644
--- a/include/wlr/types/wlr_keyboard.h
+++ b/include/wlr/types/wlr_keyboard.h
@@ -1,9 +1,9 @@
#ifndef WLR_TYPES_WLR_KEYBOARD_H
#define WLR_TYPES_WLR_KEYBOARD_H
-#include <wayland-server.h>
-#include <stdint.h>
#include <stdbool.h>
+#include <stdint.h>
+#include <wayland-server.h>
#include <wayland-server.h>
#include <xkbcommon/xkbcommon.h>
diff --git a/include/wlr/types/wlr_list.h b/include/wlr/types/wlr_list.h
index 78a30995..23bf53b7 100644
--- a/include/wlr/types/wlr_list.h
+++ b/include/wlr/types/wlr_list.h
@@ -1,8 +1,8 @@
-#ifndef WLR_UTIL_LIST_H
-#define WLR_UTIL_LIST_H
+#ifndef WLR_TYPES_WLR_LIST_H
+#define WLR_TYPES_WLR_LIST_H
-#include <stddef.h>
#include <stdbool.h>
+#include <stddef.h>
struct wlr_list {
size_t capacity;
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 8eed06fe..5c2ffee0 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -1,11 +1,11 @@
#ifndef WLR_TYPES_WLR_OUTPUT_H
#define WLR_TYPES_WLR_OUTPUT_H
+#include <pixman.h>
#include <stdbool.h>
#include <time.h>
-#include <pixman.h>
-#include <wayland-util.h>
#include <wayland-server.h>
+#include <wayland-util.h>
struct wlr_output_mode {
uint32_t flags; // enum wl_output_mode
diff --git a/include/wlr/types/wlr_output_damage.h b/include/wlr/types/wlr_output_damage.h
index 52cbce78..6682f942 100644
--- a/include/wlr/types/wlr_output_damage.h
+++ b/include/wlr/types/wlr_output_damage.h
@@ -1,8 +1,8 @@
#ifndef WLR_TYPES_WLR_OUTPUT_DAMAGE_H
#define WLR_TYPES_WLR_OUTPUT_DAMAGE_H
-#include <time.h>
#include <pixman.h>
+#include <time.h>
#include <wlr/types/wlr_output.h>
/**
diff --git a/include/wlr/types/wlr_output_layout.h b/include/wlr/types/wlr_output_layout.h
index 9187b377..7dd2b16a 100644
--- a/include/wlr/types/wlr_output_layout.h
+++ b/include/wlr/types/wlr_output_layout.h
@@ -1,10 +1,10 @@
#ifndef WLR_TYPES_WLR_OUTPUT_LAYOUT_H
#define WLR_TYPES_WLR_OUTPUT_LAYOUT_H
+#include <stdbool.h>
+#include <wayland-util.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h>
-#include <wayland-util.h>
-#include <stdbool.h>
struct wlr_output_layout_state;
diff --git a/include/wlr/types/wlr_pointer.h b/include/wlr/types/wlr_pointer.h
index 3a6d2175..e7ac9b46 100644
--- a/include/wlr/types/wlr_pointer.h
+++ b/include/wlr/types/wlr_pointer.h
@@ -1,9 +1,9 @@
#ifndef WLR_TYPES_WLR_POINTER_H
#define WLR_TYPES_WLR_POINTER_H
-#include <wlr/types/wlr_input_device.h>
-#include <wayland-server.h>
#include <stdint.h>
+#include <wayland-server.h>
+#include <wlr/types/wlr_input_device.h>
struct wlr_pointer_impl;
diff --git a/include/wlr/types/wlr_primary_selection.h b/include/wlr/types/wlr_primary_selection.h
index da3c096a..78f23ad6 100644
--- a/include/wlr/types/wlr_primary_selection.h
+++ b/include/wlr/types/wlr_primary_selection.h
@@ -1,8 +1,8 @@
#ifndef WLR_TYPES_WLR_PRIMARY_SELECTION_H
#define WLR_TYPES_WLR_PRIMARY_SELECTION_H
-#include <wlr/types/wlr_seat.h>
#include <wayland-server.h>
+#include <wlr/types/wlr_seat.h>
struct wlr_primary_selection_device_manager {
struct wl_global *global;
diff --git a/include/wlr/types/wlr_screenshooter.h b/include/wlr/types/wlr_screenshooter.h
index cfe7742d..680d86f0 100644
--- a/include/wlr/types/wlr_screenshooter.h
+++ b/include/wlr/types/wlr_screenshooter.h
@@ -1,5 +1,6 @@
-#ifndef _WLR_SCREENSHOOTER_H
-#define _WLR_SCREENSHOOTER_H
+#ifndef WLR_TYPES_WLR_SCREENSHOOTER_H
+#define WLR_TYPES_WLR_SCREENSHOOTER_H
+
#include <wayland-server.h>
struct wlr_screenshooter {
diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h
index ffdabd98..b03cab6e 100644
--- a/include/wlr/types/wlr_seat.h
+++ b/include/wlr/types/wlr_seat.h
@@ -1,10 +1,11 @@
#ifndef WLR_TYPES_WLR_SEAT_H
#define WLR_TYPES_WLR_SEAT_H
+
#include <time.h>
-#include <wlr/types/wlr_surface.h>
+#include <wayland-server.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_keyboard.h>
-#include <wayland-server.h>
+#include <wlr/types/wlr_surface.h>
/**
* Contains state for a single client's bound wl_seat resource and can be used
diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h
index 50316abc..998b5ae5 100644
--- a/include/wlr/types/wlr_surface.h
+++ b/include/wlr/types/wlr_surface.h
@@ -1,9 +1,10 @@
#ifndef WLR_TYPES_WLR_SURFACE_H
#define WLR_TYPES_WLR_SURFACE_H
-#include <stdint.h>
+
+#include <pixman.h>
#include <stdbool.h>
+#include <stdint.h>
#include <time.h>
-#include <pixman.h>
#include <wayland-server.h>
#include <wlr/types/wlr_output.h>
diff --git a/include/wlr/types/wlr_tablet_pad.h b/include/wlr/types/wlr_tablet_pad.h
index 51a65dd1..e70db516 100644
--- a/include/wlr/types/wlr_tablet_pad.h
+++ b/include/wlr/types/wlr_tablet_pad.h
@@ -1,9 +1,9 @@
#ifndef WLR_TYPES_WLR_TABLET_PAD_H
#define WLR_TYPES_WLR_TABLET_PAD_H
-#include <wlr/types/wlr_input_device.h>
-#include <wayland-server.h>
#include <stdint.h>
+#include <wayland-server.h>
+#include <wlr/types/wlr_input_device.h>
/*
* NOTE: the wlr tablet pad implementation does not currently support tablets
diff --git a/include/wlr/types/wlr_tablet_tool.h b/include/wlr/types/wlr_tablet_tool.h
index c6984d4d..59e49ef8 100644
--- a/include/wlr/types/wlr_tablet_tool.h
+++ b/include/wlr/types/wlr_tablet_tool.h
@@ -1,9 +1,9 @@
#ifndef WLR_TYPES_TABLET_TOOL_H
#define WLR_TYPES_TABLET_TOOL_H
-#include <wlr/types/wlr_input_device.h>
-#include <wayland-server.h>
#include <stdint.h>
+#include <wayland-server.h>
+#include <wlr/types/wlr_input_device.h>
struct wlr_tablet_tool_impl;
diff --git a/include/wlr/types/wlr_touch.h b/include/wlr/types/wlr_touch.h
index 2925fd01..8ea293eb 100644
--- a/include/wlr/types/wlr_touch.h
+++ b/include/wlr/types/wlr_touch.h
@@ -1,8 +1,8 @@
#ifndef WLR_TYPES_WLR_TOUCH_H
#define WLR_TYPES_WLR_TOUCH_H
-#include <wayland-server.h>
#include <stdint.h>
+#include <wayland-server.h>
struct wlr_touch_impl;
diff --git a/include/wlr/types/wlr_xdg_shell_v6.h b/include/wlr/types/wlr_xdg_shell_v6.h
index c7b1a24b..7dc746ce 100644
--- a/include/wlr/types/wlr_xdg_shell_v6.h
+++ b/include/wlr/types/wlr_xdg_shell_v6.h
@@ -1,9 +1,9 @@
#ifndef WLR_TYPES_WLR_XDG_SHELL_V6_H
#define WLR_TYPES_WLR_XDG_SHELL_V6_H
+#include <wayland-server.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_seat.h>
-#include <wayland-server.h>
struct wlr_xdg_shell_v6 {
struct wl_global *wl_global;
diff --git a/include/wlr/xwayland.h b/include/wlr/xwayland.h
index c0135943..ad7ceb83 100644
--- a/include/wlr/xwayland.h
+++ b/include/wlr/xwayland.h
@@ -1,8 +1,8 @@
#ifndef WLR_XWAYLAND_H
#define WLR_XWAYLAND_H
-#include <time.h>
#include <stdbool.h>
+#include <time.h>
#include <wlr/config.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_seat.h>
diff --git a/include/wlr/xwm.h b/include/wlr/xwm.h
index 35c43b18..242ff9cc 100644
--- a/include/wlr/xwm.h
+++ b/include/wlr/xwm.h
@@ -1,9 +1,9 @@
-#ifndef XWAYLAND_INTERNALS_H
-#define XWAYLAND_INTERNALS_H
+#ifndef WLR_XWM_H
+#define WLR_XWM_H
-#include <xcb/render.h>
#include <wayland-server-core.h>
#include <wlr/xwayland.h>
+#include <xcb/render.h>
enum atom_name {
WL_SURFACE_ID,
diff --git a/meson.build b/meson.build
index 6c8a3a8b..1cf7781a 100644
--- a/meson.build
+++ b/meson.build
@@ -157,16 +157,16 @@ wlroots = declare_dependency(
summary = [
- '',
- '----------------',
- 'wlroots @0@'.format(meson.project_version()),
- '',
- ' libcap: @0@'.format(conf_data.get('WLR_HAS_LIBCAP', false)),
- ' systemd: @0@'.format(conf_data.get('WLR_HAS_SYSTEMD', false)),
- ' elogind: @0@'.format(conf_data.get('WLR_HAS_ELOGIND', false)),
- ' xwayland: @0@'.format(conf_data.get('WLR_HAS_XWAYLAND', false)),
- '----------------',
- ''
+ '',
+ '----------------',
+ 'wlroots @0@'.format(meson.project_version()),
+ '',
+ ' libcap: @0@'.format(conf_data.get('WLR_HAS_LIBCAP', false)),
+ ' systemd: @0@'.format(conf_data.get('WLR_HAS_SYSTEMD', false)),
+ ' elogind: @0@'.format(conf_data.get('WLR_HAS_ELOGIND', false)),
+ ' xwayland: @0@'.format(conf_data.get('WLR_HAS_XWAYLAND', false)),
+ '----------------',
+ ''
]
message('\n'.join(summary))
@@ -195,18 +195,18 @@ if git.found()
etags = find_program('etags', required: false)
if etags.found() and all_files.length() > 0
custom_target('etags',
- build_by_default: true,
- input: all_files,
- output: 'TAGS',
- command: [etags.path(), '-o', 'TAGS'] + all_files)
+ build_by_default: true,
+ input: all_files,
+ output: 'TAGS',
+ command: [etags.path(), '-o', 'TAGS'] + all_files)
endif
ctags = find_program('ctags', required: false)
if ctags.found() and all_files.length() > 0
custom_target('ctags',
- build_by_default: true,
- input: all_files,
- output: 'tags',
- command: [ctags.path(), '-o', 'tags'] + all_files)
+ build_by_default: true,
+ input: all_files,
+ output: 'tags',
+ command: [ctags.path(), '-o', 'tags'] + all_files)
endif
endif
diff --git a/protocol/meson.build b/protocol/meson.build
index 6e9f4125..0db7c03c 100644
--- a/protocol/meson.build
+++ b/protocol/meson.build
@@ -24,18 +24,18 @@ protocols = [
[wl_protocol_dir, 'unstable/xdg-shell/xdg-shell-unstable-v6.xml'],
'gamma-control.xml',
'gtk-primary-selection.xml',
+ 'idle.xml',
'screenshooter.xml',
'server-decoration.xml',
- 'idle.xml',
]
client_protocols = [
[wl_protocol_dir, 'unstable/xdg-shell/xdg-shell-unstable-v6.xml'],
'gamma-control.xml',
'gtk-primary-selection.xml',
+ 'idle.xml',
'screenshooter.xml',
'server-decoration.xml',
- 'idle.xml',
]
wl_protos_src = []
diff --git a/render/egl.c b/render/egl.c
index 328726ba..f1208a72 100644
--- a/render/egl.c
+++ b/render/egl.c
@@ -1,10 +1,10 @@
#include <assert.h>
-#include <stdlib.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES2/gl2.h>
-#include <wlr/util/log.h>
+#include <stdlib.h>
#include <wlr/render/egl.h>
+#include <wlr/util/log.h>
#include "glapi.h"
// Extension documentation
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index f57e9dae..81a932e6 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -1,10 +1,10 @@
-#include <stdint.h>
-#include <stdlib.h>
#include <assert.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-#include <wayland-util.h>
+#include <stdint.h>
+#include <stdlib.h>
#include <wayland-server-protocol.h>
+#include <wayland-util.h>
#include <wlr/backend.h>
#include <wlr/render.h>
#include <wlr/render/egl.h>
diff --git a/render/gles2/shaders.c b/render/gles2/shaders.c
index ff6fba9c..46a10248 100644
--- a/render/gles2/shaders.c
+++ b/render/gles2/shaders.c
@@ -1,5 +1,5 @@
-#include "render/gles2.h"
#include <GLES2/gl2.h>
+#include "render/gles2.h"
// Colored quads
const GLchar quad_vertex_src[] =
diff --git a/render/gles2/texture.c b/render/gles2/texture.c
index a594f23e..688a51d8 100644
--- a/render/gles2/texture.c
+++ b/render/gles2/texture.c
@@ -1,17 +1,17 @@
-#include <stdint.h>
-#include <stdlib.h>
#include <assert.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-#include <wayland-util.h>
+#include <stdint.h>
+#include <stdlib.h>
#include <wayland-server-protocol.h>
+#include <wayland-util.h>
#include <wlr/render.h>
#include <wlr/render/egl.h>
#include <wlr/render/interface.h>
#include <wlr/render/matrix.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "render/gles2.h"
+#include "util/signal.h"
static struct pixel_format external_pixel_format = {
.wl_format = 0,
diff --git a/render/gles2/util.c b/render/gles2/util.c
index 9498a1cd..c291f533 100644
--- a/render/gles2/util.c
+++ b/render/gles2/util.c
@@ -1,6 +1,6 @@
-#include <stdlib.h>
-#include <stdbool.h>
#include <GLES2/gl2.h>
+#include <stdbool.h>
+#include <stdlib.h>
#include <wlr/util/log.h>
#include "render/gles2.h"
diff --git a/render/matrix.c b/render/matrix.c
index fa45dd04..d5d7f49d 100644
--- a/render/matrix.c
+++ b/render/matrix.c
@@ -1,9 +1,9 @@
-#include <string.h>
#include <math.h>
+#include <string.h>
#include <wayland-server-protocol.h>
+#include <wlr/render/matrix.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h>
-#include <wlr/render/matrix.h>
/* Obtains the index for the given row/column */
static inline int mind(int row, int col) {
diff --git a/render/meson.build b/render/meson.build
index 309e83cd..1a5a85b8 100644
--- a/render/meson.build
+++ b/render/meson.build
@@ -10,12 +10,12 @@ lib_wlr_render = static_library(
'wlr_render',
files(
'egl.c',
- 'matrix.c',
'gles2/pixel_format.c',
'gles2/renderer.c',
'gles2/shaders.c',
'gles2/texture.c',
'gles2/util.c',
+ 'matrix.c',
'wlr_renderer.c',
'wlr_texture.c',
),
diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c
index c8f06a64..fa6c6fc3 100644
--- a/render/wlr_renderer.c
+++ b/render/wlr_renderer.c
@@ -1,5 +1,5 @@
-#include <stdlib.h>
#include <stdbool.h>
+#include <stdlib.h>
#include <wlr/render/interface.h>
void wlr_renderer_init(struct wlr_renderer *renderer,
diff --git a/render/wlr_texture.c b/render/wlr_texture.c
index 4ce86bdd..a82a16b2 100644
--- a/render/wlr_texture.c
+++ b/render/wlr_texture.c
@@ -1,5 +1,5 @@
-#include <stdlib.h>
#include <stdbool.h>
+#include <stdlib.h>
#include <wlr/render/interface.h>
void wlr_texture_init(struct wlr_texture *texture,
diff --git a/rootston/config.c b/rootston/config.c
index 26cbd12d..e63efc0b 100644
--- a/rootston/config.c
+++ b/rootston/config.c
@@ -2,20 +2,20 @@
#define _POSIX_C_SOURCE 200809L
#endif
#include <assert.h>
-#include <stdlib.h>
-#include <limits.h>
#include <getopt.h>
+#include <limits.h>
+#include <stdlib.h>
#include <string.h>
#include <strings.h>
-#include <unistd.h>
#include <sys/param.h>
+#include <unistd.h>
#include <wlr/config.h>
-#include <wlr/util/log.h>
#include <wlr/types/wlr_box.h>
+#include <wlr/util/log.h>
#include "rootston/config.h"
+#include "rootston/ini.h"
#include "rootston/input.h"
#include "rootston/keyboard.h"
-#include "rootston/ini.h"
static void usage(const char *name, int ret) {
fprintf(stderr,
diff --git a/rootston/cursor.c b/rootston/cursor.c
index ab32a5de..aa94daeb 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -1,16 +1,16 @@
#define _XOPEN_SOURCE 700
-#include <stdlib.h>
#include <math.h>
+#include <stdlib.h>
+#include <wlr/types/wlr_xcursor_manager.h>
+#include <wlr/util/edges.h>
+#include <wlr/util/log.h>
#ifdef __linux__
#include <linux/input-event-codes.h>
#elif __FreeBSD__
#include <dev/evdev/input-event-codes.h>
#endif
-#include <wlr/types/wlr_xcursor_manager.h>
-#include <wlr/util/log.h>
-#include <wlr/util/edges.h>
-#include "rootston/xcursor.h"
#include "rootston/cursor.h"
+#include "rootston/xcursor.h"
struct roots_cursor *roots_cursor_create(struct roots_seat *seat) {
struct roots_cursor *cursor = calloc(1, sizeof(struct roots_cursor));
diff --git a/rootston/desktop.c b/rootston/desktop.c
index 68da45e0..80ccbc25 100644
--- a/rootston/desktop.c
+++ b/rootston/desktop.c
@@ -1,25 +1,25 @@
#define _POSIX_C_SOURCE 199309L
#include <assert.h>
-#include <time.h>
-#include <stdlib.h>
#include <math.h>
+#include <stdlib.h>
+#include <time.h>
#include <wlr/config.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_gamma_control.h>
#include <wlr/types/wlr_idle.h>
+#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_primary_selection.h>
#include <wlr/types/wlr_server_decoration.h>
-#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_wl_shell.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/types/wlr_xdg_shell_v6.h>
#include <wlr/util/log.h>
-#include "rootston/server.h"
#include "rootston/seat.h"
-#include "rootston/xcursor.h"
+#include "rootston/server.h"
#include "rootston/view.h"
+#include "rootston/xcursor.h"
void view_get_box(const struct roots_view *view, struct wlr_box *box) {
box->x = view->x;
diff --git a/rootston/input.c b/rootston/input.c
index a0da2531..657b0946 100644
--- a/rootston/input.c
+++ b/rootston/input.c
@@ -1,16 +1,16 @@
#include <assert.h>
#include <stdlib.h>
#include <wayland-server.h>
+#include <wlr/backend/libinput.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/util/log.h>
#include <wlr/xcursor.h>
#include <wlr/xwayland.h>
-#include <wlr/backend/libinput.h>
-#include "rootston/server.h"
#include "rootston/config.h"
#include "rootston/input.h"
#include "rootston/keyboard.h"
#include "rootston/seat.h"
+#include "rootston/server.h"
static const char *device_type(enum wlr_input_device_type type) {
switch (type) {
diff --git a/rootston/keyboard.c b/rootston/keyboard.c
index ddf541b4..6ec90c31 100644
--- a/rootston/keyboard.c
+++ b/rootston/keyboard.c
@@ -1,18 +1,18 @@
#include <assert.h>
+#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
-#include <stdbool.h>
#include <wayland-server.h>
-#include <wlr/types/wlr_input_device.h>
-#include <wlr/types/wlr_pointer.h>
#include <wlr/backend/multi.h>
#include <wlr/backend/session.h>
+#include <wlr/types/wlr_input_device.h>
+#include <wlr/types/wlr_pointer.h>
#include <wlr/util/log.h>
#include <xkbcommon/xkbcommon.h>
#include "rootston/input.h"
-#include "rootston/seat.h"
#include "rootston/keyboard.h"
+#include "rootston/seat.h"
static ssize_t pressed_keysyms_index(xkb_keysym_t *pressed_keysyms,
xkb_keysym_t keysym) {
diff --git a/rootston/main.c b/rootston/main.c
index 3273c53f..5450ade2 100644
--- a/rootston/main.c
+++ b/rootston/main.c
@@ -3,10 +3,10 @@
#include <stdlib.h>
#include <unistd.h>
#include <wayland-server.h>
-#include <wlr/config.h>
#include <wlr/backend.h>
#include <wlr/backend/headless.h>
#include <wlr/backend/multi.h>
+#include <wlr/config.h>
#include <wlr/render.h>
#include <wlr/util/log.h>
#include "rootston/config.h"
diff --git a/rootston/meson.build b/rootston/meson.build
index 973f93a4..a53812e3 100644
--- a/rootston/meson.build
+++ b/rootston/meson.build
@@ -8,8 +8,8 @@ sources = [
'main.c',
'output.c',
'seat.c',
- 'xdg_shell_v6.c',
'wl_shell.c',
+ 'xdg_shell_v6.c',
]
if get_option('enable_xwayland')
sources += ['xwayland.c']
diff --git a/rootston/output.c b/rootston/output.c
index bd2ec18d..1ea4412e 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -1,18 +1,18 @@
#define _POSIX_C_SOURCE 200809L
-#include <time.h>
-#include <stdlib.h>
-#include <stdbool.h>
#include <assert.h>
-#include <wlr/types/wlr_output_layout.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <time.h>
+#include <wlr/render/matrix.h>
#include <wlr/types/wlr_compositor.h>
+#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_wl_shell.h>
#include <wlr/types/wlr_xdg_shell_v6.h>
-#include <wlr/render/matrix.h>
#include <wlr/util/log.h>
#include <wlr/util/region.h>
-#include "rootston/server.h"
-#include "rootston/output.h"
#include "rootston/config.h"
+#include "rootston/output.h"
+#include "rootston/server.h"
typedef void (*surface_iterator_func_t)(struct wlr_surface *surface,
double lx, double ly, float rotation, void *data);
diff --git a/rootston/seat.c b/rootston/seat.c
index 0c9867ec..38c26628 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -3,14 +3,14 @@
#include <string.h>
#include <wayland-server.h>
#include <wlr/config.h>
+#include <wlr/types/wlr_idle.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/util/log.h>
-#include <wlr/types/wlr_idle.h>
-#include "rootston/xcursor.h"
+#include "rootston/cursor.h"
#include "rootston/input.h"
-#include "rootston/seat.h"
#include "rootston/keyboard.h"
-#include "rootston/cursor.h"
+#include "rootston/seat.h"
+#include "rootston/xcursor.h"
static void handle_keyboard_key(struct wl_listener *listener, void *data) {
struct roots_keyboard *keyboard =
diff --git a/rootston/wl_shell.c b/rootston/wl_shell.c
index 267e2cf5..44a65cf5 100644
--- a/rootston/wl_shell.c
+++ b/rootston/wl_shell.c
@@ -1,14 +1,14 @@
#include <assert.h>
-#include <stdlib.h>
#include <stdbool.h>
+#include <stdlib.h>
#include <wayland-server.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_surface.h>
#include <wlr/types/wlr_wl_shell.h>
#include <wlr/util/log.h>
#include "rootston/desktop.h"
-#include "rootston/server.h"
#include "rootston/input.h"
+#include "rootston/server.h"
static void popup_destroy(struct roots_view_child *child) {
assert(child->destroy == popup_destroy);
diff --git a/rootston/xdg_shell_v6.c b/rootston/xdg_shell_v6.c
index 9bd6f76a..8e6674ab 100644
--- a/rootston/xdg_shell_v6.c
+++ b/rootston/xdg_shell_v6.c
@@ -1,14 +1,14 @@
#include <assert.h>
-#include <stdlib.h>
#include <stdbool.h>
+#include <stdlib.h>
#include <wayland-server.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_surface.h>
#include <wlr/types/wlr_xdg_shell_v6.h>
#include <wlr/util/log.h>
#include "rootston/desktop.h"
-#include "rootston/server.h"
#include "rootston/input.h"
+#include "rootston/server.h"
static void popup_destroy(struct roots_view_child *child) {
assert(child->destroy == popup_destroy);
diff --git a/rootston/xwayland.c b/rootston/xwayland.c
index 36be9793..e9e0d5e0 100644
--- a/rootston/xwayland.c
+++ b/rootston/xwayland.c
@@ -1,12 +1,12 @@
#include <assert.h>
-#include <stdlib.h>
#include <stdbool.h>
+#include <stdlib.h>
#include <wayland-server.h>
#include <wlr/config.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_surface.h>
-#include <wlr/xwayland.h>
#include <wlr/util/log.h>
+#include <wlr/xwayland.h>
#include "rootston/server.h"
#include "rootston/server.h"
diff --git a/types/meson.build b/types/meson.build
index 9f37cc86..2731f9bc 100644
--- a/types/meson.build
+++ b/types/meson.build
@@ -1,18 +1,18 @@
lib_wlr_types = static_library(
'wlr_types',
files(
- 'wlr_data_device.c',
'wlr_box.c',
'wlr_compositor.c',
'wlr_cursor.c',
+ 'wlr_data_device.c',
'wlr_gamma_control.c',
'wlr_idle.c',
'wlr_input_device.c',
'wlr_keyboard.c',
'wlr_list.c',
- 'wlr_output.c',
'wlr_output_damage.c',
'wlr_output_layout.c',
+ 'wlr_output.c',
'wlr_pointer.c',
'wlr_primary_selection.c',
'wlr_region.c',
diff --git a/types/wlr_box.c b/types/wlr_box.c
index 33031858..2ea743d0 100644
--- a/types/wlr_box.c
+++ b/types/wlr_box.c
@@ -1,7 +1,7 @@
#include <limits.h>
-#include <stdlib.h>
#include <math.h>
#include <stdbool.h>
+#include <stdlib.h>
#include <wayland-server-protocol.h>
#include <wlr/types/wlr_box.h>
#include <wlr/util/log.h>
diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c
index bd56b0fb..925e0019 100644
--- a/types/wlr_compositor.c
+++ b/types/wlr_compositor.c
@@ -1,11 +1,11 @@
#include <assert.h>
#include <stdlib.h>
#include <wayland-server.h>
+#include <wlr/types/wlr_compositor.h>
+#include <wlr/types/wlr_region.h>
+#include <wlr/types/wlr_surface.h>
#include <wlr/util/log.h>
#include "util/signal.h"
-#include <wlr/types/wlr_surface.h>
-#include <wlr/types/wlr_region.h>
-#include <wlr/types/wlr_compositor.h>
static void destroy_surface_listener(struct wl_listener *listener, void *data) {
wl_list_remove(wl_resource_get_link(data));
diff --git a/types/wlr_cursor.c b/types/wlr_cursor.c
index 4f3d8727..20acebf1 100644
--- a/types/wlr_cursor.c
+++ b/types/wlr_cursor.c
@@ -1,13 +1,13 @@
-#include <wlr/types/wlr_cursor.h>
-#include <stdlib.h>
#include <assert.h>
#include <limits.h>
-#include <wlr/util/log.h>
-#include "util/signal.h"
+#include <stdlib.h>
#include <wayland-server.h>
-#include <wlr/types/wlr_output.h>
-#include <wlr/types/wlr_output_layout.h>
+#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_input_device.h>
+#include <wlr/types/wlr_output_layout.h>
+#include <wlr/types/wlr_output.h>
+#include <wlr/util/log.h>
+#include "util/signal.h"
struct wlr_cursor_device {
struct wlr_cursor *cursor;
diff --git a/types/wlr_data_device.c b/types/wlr_data_device.c
index 7153dd53..b8ef820b 100644
--- a/types/wlr_data_device.c
+++ b/types/wlr_data_device.c
@@ -1,14 +1,14 @@
#define _XOPEN_SOURCE 700
+#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
-#include <assert.h>
#include <unistd.h>
#include <wayland-server.h>
+#include <wlr/types/wlr_data_device.h>
+#include <wlr/types/wlr_seat.h>
#include <wlr/util/log.h>
#include "util/signal.h"
-#include <wlr/types/wlr_seat.h>
-#include <wlr/types/wlr_data_device.h>
#define ALL_ACTIONS (WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY | \
WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE | \
diff --git a/types/wlr_gamma_control.c b/types/wlr_gamma_control.c
index 214dfd21..861427bd 100644
--- a/types/wlr_gamma_control.c
+++ b/types/wlr_gamma_control.c
@@ -4,8 +4,8 @@
#include <wlr/types/wlr_gamma_control.h>
#include <wlr/types/wlr_output.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "gamma-control-protocol.h"
+#include "util/signal.h"
static void resource_destroy(struct wl_client *client,
struct wl_resource *resource) {
diff --git a/types/wlr_idle.c b/types/wlr_idle.c
index 1976004f..9eddc42b 100644
--- a/types/wlr_idle.c
+++ b/types/wlr_idle.c
@@ -4,8 +4,8 @@
#include <wayland-server.h>
#include <wlr/types/wlr_idle.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "idle-protocol.h"
+#include "util/signal.h"
static void idle_timeout_destroy(struct wlr_idle_timeout *timer) {
wl_list_remove(&timer->input_listener.link);
diff --git a/types/wlr_input_device.c b/types/wlr_input_device.c
index 372b3a7b..65d4b1d6 100644
--- a/types/wlr_input_device.c
+++ b/types/wlr_input_device.c
@@ -2,13 +2,13 @@
#include <stdlib.h>
#include <string.h>
#include <wayland-server.h>
-#include <wlr/types/wlr_input_device.h>
#include <wlr/interfaces/wlr_input_device.h>
#include <wlr/interfaces/wlr_keyboard.h>
#include <wlr/interfaces/wlr_pointer.h>
-#include <wlr/interfaces/wlr_touch.h>
-#include <wlr/interfaces/wlr_tablet_tool.h>
#include <wlr/interfaces/wlr_tablet_pad.h>
+#include <wlr/interfaces/wlr_tablet_tool.h>
+#include <wlr/interfaces/wlr_touch.h>
+#include <wlr/types/wlr_input_device.h>
#include <wlr/util/log.h>
#include "util/signal.h"
diff --git a/types/wlr_keyboard.c b/types/wlr_keyboard.c
index 6f09d599..5c0699ff 100644
--- a/types/wlr_keyboard.c
+++ b/types/wlr_keyboard.c
@@ -1,11 +1,11 @@
+#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <unistd.h>
-#include <assert.h>
#include <wayland-server.h>
-#include <wlr/types/wlr_keyboard.h>
#include <wlr/interfaces/wlr_keyboard.h>
+#include <wlr/types/wlr_keyboard.h>
#include <wlr/util/log.h>
#include "util/signal.h"
diff --git a/types/wlr_list.c b/types/wlr_list.c
index 565a155b..2be0912a 100644
--- a/types/wlr_list.c
+++ b/types/wlr_list.c
@@ -1,8 +1,8 @@
+#include <stdbool.h>
+#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
-#include <stdbool.h>
#include <string.h>
-#include <stddef.h>
#include <sys/types.h>
#include <wlr/types/wlr_list.h>
diff --git a/types/wlr_output.c b/types/wlr_output.c
index 7dcf4c78..504d0209 100644
--- a/types/wlr_output.c
+++ b/types/wlr_output.c
@@ -5,13 +5,13 @@
#include <tgmath.h>
#include <time.h>
#include <wayland-server.h>
+#include <wlr/interfaces/wlr_output.h>
+#include <wlr/render.h>
+#include <wlr/render/matrix.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_surface.h>
-#include <wlr/interfaces/wlr_output.h>
#include <wlr/util/log.h>
-#include <wlr/render/matrix.h>
-#include <wlr/render.h>
#include <wlr/util/region.h>
#include "util/signal.h"
diff --git a/types/wlr_output_damage.c b/types/wlr_output_damage.c
index c231a900..b3636c37 100644
--- a/types/wlr_output_damage.c
+++ b/types/wlr_output_damage.c
@@ -1,11 +1,11 @@
-#include <stdlib.h>
#include <stddef.h>
+#include <stdlib.h>
#include <time.h>
#include <wayland-server.h>
-#include "util/signal.h"
#include <wlr/types/wlr_box.h>
-#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_damage.h>
+#include <wlr/types/wlr_output.h>
+#include "util/signal.h"
static void output_handle_destroy(struct wl_listener *listener, void *data) {
struct wlr_output_damage *output_damage =
diff --git a/types/wlr_output_layout.c b/types/wlr_output_layout.c
index ea7b81c5..db0389bd 100644
--- a/types/wlr_output_layout.c
+++ b/types/wlr_output_layout.c
@@ -1,12 +1,12 @@
-#include <limits.h>
+#include <assert.h>
#include <float.h>
+#include <limits.h>
#include <stdlib.h>
-#include <assert.h>
+#include <wlr/types/wlr_box.h>
+#include <wlr/types/wlr_output_layout.h>
+#include <wlr/types/wlr_output.h>
#include <wlr/util/log.h>
#include "util/signal.h"
-#include <wlr/types/wlr_output.h>
-#include <wlr/types/wlr_output_layout.h>
-#include <wlr/types/wlr_box.h>
struct wlr_output_layout_state {
struct wlr_box _box; // should never be read directly, use the getter
diff --git a/types/wlr_pointer.c b/types/wlr_pointer.c
index 04100e56..bc9efd8c 100644
--- a/types/wlr_pointer.c
+++ b/types/wlr_pointer.c
@@ -1,8 +1,8 @@
#include <stdlib.h>
#include <string.h>
#include <wayland-server.h>
-#include <wlr/types/wlr_pointer.h>
#include <wlr/interfaces/wlr_pointer.h>
+#include <wlr/types/wlr_pointer.h>
void wlr_pointer_init(struct wlr_pointer *pointer,
struct wlr_pointer_impl *impl) {
diff --git a/types/wlr_primary_selection.c b/types/wlr_primary_selection.c
index 45d71f19..28fe63c1 100644
--- a/types/wlr_primary_selection.c
+++ b/types/wlr_primary_selection.c
@@ -1,9 +1,9 @@
#define _XOPEN_SOURCE 700
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
#include <assert.h>
#include <gtk-primary-selection-protocol.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#include <wlr/types/wlr_primary_selection.h>
#include <wlr/types/wlr_seat.h>
#include <wlr/util/log.h>
diff --git a/types/wlr_region.c b/types/wlr_region.c
index fdf23ad2..322088b5 100644
--- a/types/wlr_region.c
+++ b/types/wlr_region.c
@@ -1,8 +1,8 @@
-#include <stdlib.h>
-#include <stdio.h>
#include <assert.h>
-#include <wayland-server.h>
#include <pixman.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <wayland-server.h>
static void region_add(struct wl_client *client, struct wl_resource *resource,
int32_t x, int32_t y, int32_t width, int32_t height) {
diff --git a/types/wlr_screenshooter.c b/types/wlr_screenshooter.c
index 74f9f602..04757fb6 100644
--- a/types/wlr_screenshooter.c
+++ b/types/wlr_screenshooter.c
@@ -2,10 +2,10 @@
#include <stdlib.h>
#include <string.h>
#include <wayland-server.h>
-#include <wlr/render.h>
#include <wlr/backend.h>
-#include <wlr/types/wlr_screenshooter.h>
+#include <wlr/render.h>
#include <wlr/types/wlr_output.h>
+#include <wlr/types/wlr_screenshooter.h>
#include <wlr/util/log.h>
#include "screenshooter-protocol.h"
diff --git a/types/wlr_seat.c b/types/wlr_seat.c
index 3ad4d81d..d60e0e0d 100644
--- a/types/wlr_seat.c
+++ b/types/wlr_seat.c
@@ -4,12 +4,12 @@
#include <string.h>
#include <time.h>
#include <wayland-server.h>
-#include <wlr/types/wlr_seat.h>
+#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_input_device.h>
+#include <wlr/types/wlr_primary_selection.h>
+#include <wlr/types/wlr_seat.h>
#include <wlr/util/log.h>
#include "util/signal.h"
-#include <wlr/types/wlr_data_device.h>
-#include <wlr/types/wlr_primary_selection.h>
static void resource_destroy(struct wl_client *client,
struct wl_resource *resource) {
diff --git a/types/wlr_server_decoration.c b/types/wlr_server_decoration.c
index ffa0477c..556193e2 100644
--- a/types/wlr_server_decoration.c
+++ b/types/wlr_server_decoration.c
@@ -1,8 +1,8 @@
#include <assert.h>
-#include <stdlib.h>
#include <server-decoration-protocol.h>
-#include <wlr/types/wlr_surface.h>
+#include <stdlib.h>
#include <wlr/types/wlr_server_decoration.h>
+#include <wlr/types/wlr_surface.h>
#include <wlr/util/log.h>
#include "util/signal.h"
diff --git a/types/wlr_surface.c b/types/wlr_surface.c
index b761bab5..c47565c4 100644
--- a/types/wlr_surface.c
+++ b/types/wlr_surface.c
@@ -1,13 +1,13 @@
#include <assert.h>
#include <stdlib.h>
#include <wayland-server.h>
+#include <wlr/render/egl.h>
+#include <wlr/render/interface.h>
+#include <wlr/render/matrix.h>
+#include <wlr/types/wlr_surface.h>
#include <wlr/util/log.h>
#include <wlr/util/region.h>
#include "util/signal.h"
-#include <wlr/render/interface.h>
-#include <wlr/types/wlr_surface.h>
-#include <wlr/render/egl.h>
-#include <wlr/render/matrix.h>
static void wlr_surface_state_reset_buffer(struct wlr_surface_state *state) {
if (state->buffer) {
diff --git a/types/wlr_tablet_pad.c b/types/wlr_tablet_pad.c
index 07f9da10..3d25d685 100644
--- a/types/wlr_tablet_pad.c
+++ b/types/wlr_tablet_pad.c
@@ -1,8 +1,8 @@
#include <stdlib.h>
#include <string.h>
#include <wayland-server.h>
-#include <wlr/types/wlr_tablet_pad.h>
#include <wlr/interfaces/wlr_tablet_pad.h>
+#include <wlr/types/wlr_tablet_pad.h>
void wlr_tablet_pad_init(struct wlr_tablet_pad *pad,
struct wlr_tablet_pad_impl *impl) {
diff --git a/types/wlr_tablet_tool.c b/types/wlr_tablet_tool.c
index a396bb02..f46a5434 100644
--- a/types/wlr_tablet_tool.c
+++ b/types/wlr_tablet_tool.c
@@ -1,8 +1,8 @@
#include <stdlib.h>
#include <string.h>
#include <wayland-server.h>
-#include <wlr/types/wlr_tablet_tool.h>
#include <wlr/interfaces/wlr_tablet_tool.h>
+#include <wlr/types/wlr_tablet_tool.h>
void wlr_tablet_tool_init(struct wlr_tablet_tool *tool,
struct wlr_tablet_tool_impl *impl) {
diff --git a/types/wlr_touch.c b/types/wlr_touch.c
index 5db653e7..ba7ffac7 100644
--- a/types/wlr_touch.c
+++ b/types/wlr_touch.c
@@ -1,8 +1,8 @@
#include <stdlib.h>
#include <string.h>
#include <wayland-server.h>
-#include <wlr/types/wlr_touch.h>
#include <wlr/interfaces/wlr_touch.h>
+#include <wlr/types/wlr_touch.h>
void wlr_touch_init(struct wlr_touch *touch,
struct wlr_touch_impl *impl) {
diff --git a/types/wlr_wl_shell.c b/types/wlr_wl_shell.c
index e9d52cc9..85749ddd 100644
--- a/types/wlr_wl_shell.c
+++ b/types/wlr_wl_shell.c
@@ -1,14 +1,14 @@
#ifndef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L
#endif
-#include <stdlib.h>
#include <assert.h>
+#include <stdlib.h>
+#include <wayland-server-protocol.h>
#include <wayland-server.h>
-#include <wlr/util/log.h>
-#include "util/signal.h"
#include <wlr/types/wlr_surface.h>
#include <wlr/types/wlr_wl_shell.h>
-#include <wayland-server-protocol.h>
+#include <wlr/util/log.h>
+#include "util/signal.h"
static const char *wlr_wl_shell_surface_role = "wl-shell-surface";
diff --git a/types/wlr_xdg_shell_v6.c b/types/wlr_xdg_shell_v6.c
index 30870d3b..eb18f022 100644
--- a/types/wlr_xdg_shell_v6.c
+++ b/types/wlr_xdg_shell_v6.c
@@ -6,9 +6,9 @@
#include <string.h>
#include <wayland-server.h>
#include <wlr/config.h>
-#include <wlr/types/wlr_xdg_shell_v6.h>
-#include <wlr/types/wlr_surface.h>
#include <wlr/types/wlr_seat.h>
+#include <wlr/types/wlr_surface.h>
+#include <wlr/types/wlr_xdg_shell_v6.h>
#include <wlr/util/log.h>
#include "util/signal.h"
#include "xdg-shell-unstable-v6-protocol.h"
diff --git a/util/log.c b/util/log.c
index e0b6a132..327402e6 100644
--- a/util/log.c
+++ b/util/log.c
@@ -3,9 +3,9 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <string.h>
#include <time.h>
+#include <unistd.h>
#include <wlr/util/log.h>
static bool colored = true;
diff --git a/util/os-compatibility.c b/util/os-compatibility.c
index 98aeab3d..bd3067d2 100644
--- a/util/os-compatibility.c
+++ b/util/os-compatibility.c
@@ -24,13 +24,13 @@
*/
#define _XOPEN_SOURCE 700
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <unistd.h>
-#include <fcntl.h>
#include <errno.h>
-#include <string.h>
+#include <fcntl.h>
#include <stdlib.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <unistd.h>
#include "util/os-compatibility.h"
int os_fd_set_cloexec(int fd) {
diff --git a/util/region.c b/util/region.c
index 1bde0cb8..88e38fd2 100644
--- a/util/region.c
+++ b/util/region.c
@@ -1,5 +1,5 @@
-#include <stdlib.h>
#include <math.h>
+#include <stdlib.h>
#include <wlr/util/region.h>
void wlr_region_scale(pixman_region32_t *dst, pixman_region32_t *src,
diff --git a/xcursor/meson.build b/xcursor/meson.build
index afaab915..31040a92 100644
--- a/xcursor/meson.build
+++ b/xcursor/meson.build
@@ -1,8 +1,8 @@
lib_wlr_xcursor = static_library(
'wlr_xcursor',
files(
- 'xcursor.c',
'wlr_xcursor.c',
+ 'xcursor.c',
),
include_directories: wlr_inc,
dependencies: [egl] # header required via include/wlr/render.h
diff --git a/xcursor/wlr_xcursor.c b/xcursor/wlr_xcursor.c
index 2d1a38b5..7fcdbb6f 100644
--- a/xcursor/wlr_xcursor.c
+++ b/xcursor/wlr_xcursor.c
@@ -24,12 +24,12 @@
*/
#define _XOPEN_SOURCE 500
-#include <wlr/xcursor.h>
-#include <wlr/util/log.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-#include <stdint.h>
#include <string.h>
+#include <wlr/util/log.h>
+#include <wlr/xcursor.h>
#include "xcursor/xcursor.h"
static void wlr_xcursor_destroy(struct wlr_xcursor *cursor) {
diff --git a/xcursor/xcursor.c b/xcursor/xcursor.c
index 8dc35a7c..32711105 100644
--- a/xcursor/xcursor.c
+++ b/xcursor/xcursor.c
@@ -24,11 +24,11 @@
*/
#define _DEFAULT_SOURCE
-#include "xcursor/xcursor.h"
+#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <dirent.h>
+#include "xcursor/xcursor.h"
/*
* From libXcursor/include/X11/extensions/Xcursor.h
diff --git a/xwayland/selection.c b/xwayland/selection.c
index 060c0baf..ffcde4d0 100644
--- a/xwayland/selection.c
+++ b/xwayland/selection.c
@@ -1,14 +1,14 @@
#define _XOPEN_SOURCE 700
+#include <assert.h>
+#include <fcntl.h>
#include <stdlib.h>
-#include <unistd.h>
#include <string.h>
-#include <assert.h>
+#include <unistd.h>
+#include <wlr/types/wlr_data_device.h>
+#include <wlr/types/wlr_primary_selection.h>
+#include <wlr/util/log.h>
+#include <wlr/xwm.h>
#include <xcb/xfixes.h>
-#include <fcntl.h>
-#include "wlr/util/log.h"
-#include "wlr/types/wlr_data_device.h"
-#include "wlr/types/wlr_primary_selection.h"
-#include "wlr/xwm.h"
static const size_t incr_chunk_size = 64 * 1024;
diff --git a/xwayland/sockets.c b/xwayland/sockets.c
index 2119056d..1e943b1d 100644
--- a/xwayland/sockets.c
+++ b/xwayland/sockets.c
@@ -3,19 +3,19 @@
// for SOCK_CLOEXEC
#define __BSD_VISIBLE 1
#endif
-#include <stdlib.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <unistd.h>
+#include <stdlib.h>
#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include <sys/un.h>
-#include <errno.h>
-#include "wlr/util/log.h"
+#include <unistd.h>
+#include <wlr/util/log.h>
#include "sockets.h"
static const char *lock_fmt = "/tmp/.X%d-lock";
diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c
index 74555edb..1d935180 100644
--- a/xwayland/xwayland.c
+++ b/xwayland/xwayland.c
@@ -4,23 +4,23 @@
// for SOCK_CLOEXEC
#define __BSD_VISIBLE 1
#endif
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
+#include <errno.h>
#include <fcntl.h>
#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <time.h>
-#include <stdlib.h>
-#include <errno.h>
+#include <unistd.h>
#include <wayland-server.h>
-#include <wlr/xwayland.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
+#include <wlr/xwayland.h>
+#include <wlr/xwm.h>
#include "sockets.h"
-#include "wlr/xwm.h"
+#include "util/signal.h"
#ifdef __FreeBSD__
static inline int clearenv(void) {
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index 425188c7..10bc2e30 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -3,18 +3,18 @@
#endif
#include <stdlib.h>
#include <unistd.h>
-#include <xcb/composite.h>
-#include <xcb/xfixes.h>
-#include <xcb/xcb_image.h>
-#include <xcb/render.h>
#include <wlr/config.h>
-#include <wlr/util/log.h>
-#include <wlr/util/edges.h>
-#include "util/signal.h"
#include <wlr/types/wlr_surface.h>
-#include <wlr/xwayland.h>
+#include <wlr/util/edges.h>
+#include <wlr/util/log.h>
#include <wlr/xcursor.h>
+#include <wlr/xwayland.h>
#include <wlr/xwm.h>
+#include <xcb/composite.h>
+#include <xcb/render.h>
+#include <xcb/xcb_image.h>
+#include <xcb/xfixes.h>
+#include "util/signal.h"
#ifdef WLR_HAS_XCB_ICCCM
#include <xcb/xcb_icccm.h>