]> git.mdlowis.com Git - proto/labwc.git/commitdiff
src: include primary header first
authorJohn Lindgren <john@jlindgren.net>
Mon, 28 Jul 2025 05:02:01 +0000 (01:02 -0400)
committerJohan Malm <johanmalm@users.noreply.github.com>
Tue, 29 Jul 2025 20:51:56 +0000 (21:51 +0100)
This is a common practice in C projects, which simply enforces that
each header must compile cleanly without implicit dependencies on
other headers (see also the previous commit).

74 files changed:
src/action.c
src/buffer.c
src/common/box.c
src/common/buf.c
src/common/dir.c
src/common/direction.c
src/common/fd-util.c
src/common/file-helpers.c
src/common/font.c
src/common/graphic-helpers.c
src/common/lab-scene-rect.c
src/common/match.c
src/common/mem.c
src/common/nodename.c
src/common/parse-bool.c
src/common/parse-double.c
src/common/scaled-font-buffer.c
src/common/scaled-icon-buffer.c
src/common/scaled-img-buffer.c
src/common/scaled-scene-buffer.c
src/common/scene-helpers.c
src/common/set.c
src/common/spawn.c
src/common/string-helpers.c
src/common/surface-helpers.c
src/config/keybind.c
src/config/libinput.c
src/config/mousebind.c
src/config/rcxml.c
src/config/session.c
src/config/tablet-tool.c
src/config/tablet.c
src/config/touch.c
src/debug.c
src/desktop-entry.c
src/dnd.c
src/edges.c
src/idle.c
src/img/img-png.c
src/img/img-svg.c
src/img/img-xbm.c
src/img/img-xpm.c
src/img/img.c
src/input/cursor.c
src/input/gestures.c
src/input/ime.c
src/input/input.c
src/input/key-state.c
src/input/keyboard.c
src/input/tablet-pad.c
src/input/tablet.c
src/input/touch.c
src/layers.c
src/magnifier.c
src/menu/menu.c
src/node.c
src/osd.c
src/output-state.c
src/output-virtual.c
src/overlay.c
src/placement.c
src/protocols/transaction-addon.c
src/regions.c
src/resistance.c
src/resize-outlines.c
src/session-lock.c
src/snap-constraints.c
src/snap.c
src/theme.c
src/view-impl-common.c
src/view.c
src/window-rules.c
src/workspaces.c
src/xwayland.c

index 8bde50982dc708ef901008089a0821489f9ba393..adcae7cf0e8ae37ca97c349e00f71a80a0e2c42a 100644 (file)
@@ -1,12 +1,12 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "action.h"
 #include <assert.h>
 #include <signal.h>
 #include <string.h>
 #include <strings.h>
 #include <unistd.h>
 #include <wlr/util/log.h>
-#include "action.h"
 #include "common/macros.h"
 #include "common/list.h"
 #include "common/mem.h"
index 8a2aa20256909cd52f01e79d136e2f67116d4a32..04ca4328d0aecf401dbbb2ebed972d00b505dcc0 100644 (file)
  * SOFTWARE.
  */
 
+#include "buffer.h"
 #include <assert.h>
 #include <stdlib.h>
 #include <drm_fourcc.h>
 #include <wlr/interfaces/wlr_buffer.h>
 #include <wlr/util/log.h>
-#include "buffer.h"
 #include "common/box.h"
 #include "common/mem.h"
 
index 0b1c0b445b8a4d8958c3975093f2536bd2d61618..84db600d408d8985af38347562fc13366927fbea 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
-#include <assert.h>
 #include "common/box.h"
+#include <assert.h>
 #include "common/macros.h"
 
 bool
index 0fe810fc725f2a70c9dc6285fe41ea2e74daf23a..c98fc97fccb3b4587c596ef8b1253286d7d8cc66 100644 (file)
@@ -1,11 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "common/buf.h"
 #include <assert.h>
 #include <ctype.h>
 #include <stdarg.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
-#include "common/buf.h"
 #include "common/macros.h"
 #include "common/mem.h"
 #include "common/string-helpers.h"
index 2b0016d7309a8b2a7abfccd07185dc72f6c42827..7b55a023716bd89cf62ab350276ed12de8cbe9ec 100644 (file)
@@ -4,13 +4,13 @@
  *
  * Copyright Johan Malm 2020
  */
+#include "common/dir.h"
 #include <assert.h>
 #include <glib.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/stat.h>
-#include "common/dir.h"
 #include "common/buf.h"
 #include "common/list.h"
 #include "common/mem.h"
index fa88eee40005487fdf4c0e0c4939d5aaf8b8bc73..ba23d1891d29f23d00315a61680fbd180a31744d 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "common/direction.h"
 #include <assert.h>
 #include <wlr/types/wlr_output_layout.h>
-#include "common/direction.h"
 #include "view.h"
 
 enum wlr_direction
index 672f467e916910516984ef2003d7bcf6c0f37977..883e2c84e1582508185d57085a3f7edefe23c7da 100644 (file)
@@ -1,11 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
 
+#include "common/fd-util.h"
 #include <sys/resource.h>
 #include <wlr/util/log.h>
 
-#include "common/fd-util.h"
-
 static struct rlimit original_nofile_rlimit = {0};
 
 void
index 2361b546ac74f2b29d36e1fc1aaf3a0547d40f75..14dc6e6f2f5f37382b0a6f7b563e55cb23ebb277 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
-#include <sys/stat.h>
 #include "common/file-helpers.h"
+#include <sys/stat.h>
 
 bool
 file_exists(const char *filename)
index 9599c846e85cdbc3cf62c0cf43bd04353490573f..8823f445fe00fcb816a3f4b678f3f569fdb41b4b 100644 (file)
@@ -1,11 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "common/font.h"
 #include <cairo.h>
 #include <drm_fourcc.h>
 #include <pango/pangocairo.h>
 #include <wlr/render/wlr_renderer.h>
 #include <wlr/util/box.h>
 #include <wlr/util/log.h>
-#include "common/font.h"
 #include "common/graphic-helpers.h"
 #include "common/string-helpers.h"
 #include "labwc.h"
index 7a8af89a5ae59c369264cdf244e072c3aaecad5f..602507a92b87ecd7e43f04f7d48c5405b51dddb0 100644 (file)
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
+#include "common/graphic-helpers.h"
 #include <cairo.h>
 #include <glib.h> /* g_ascii_strcasecmp */
 #include <wlr/types/wlr_scene.h>
-#include "common/graphic-helpers.h"
 #include "common/macros.h"
 #include "xcolor-table.h"
 
index bc23422d692b02b68b1ab900ef4c0a9ceaa917ea..2d0c740836755ac21a505a8f8e5a143ef76c5056 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "common/lab-scene-rect.h"
 #include <assert.h>
 #include <wlr/types/wlr_scene.h>
-#include "common/lab-scene-rect.h"
 #include "common/mem.h"
 
 struct border_scene {
index 9bc3cf8ba303fee2ef87c2f3ef2745d31cbcd809..2293a71c099cfef229009e89f225411504304502 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
-#include <fnmatch.h>
 #include "common/match.h"
+#include <fnmatch.h>
 
 bool
 match_glob(const char *pattern, const char *string)
index e63987b50c19840068a2c65a5f6150e07c3a409e..a7289ea05d10add53c2eef28827590461a724fee 100644 (file)
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "common/mem.h"
 #include <assert.h>
 #include <stdio.h>
 #include <string.h>
-#include "common/mem.h"
 
 static void
 die_if_null(void *ptr)
index 86dfd62025e5a85e01434dd7c7595f261fff8ab9..269e671c5475c78ff0bcf213d88900a96c1908ad 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "common/nodename.h"
 #include <ctype.h>
 #include <string.h>
-#include "common/nodename.h"
 
 char *
 nodename(xmlNode *node, char *buf, int len)
index dc6780f5ebd5a2539172fb29fc6d300547816d22..561da7639f2074fe34b9911f7130319124578d3d 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "common/parse-bool.h"
 #include <strings.h>
 #include <wlr/util/log.h>
-#include "common/parse-bool.h"
 
 enum three_state
 parse_three_state(const char *str)
index db440d0ee0217ce27e5721d329f455c725e6fc89..0e32ef3ed0132d7f1bd5a054af686ad2d2781bf8 100644 (file)
@@ -1,10 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "common/parse-double.h"
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
 #include <wlr/util/log.h>
 #include "common/mem.h"
-#include "common/parse-double.h"
 
 struct dec_separator {
        int index;
index 64584b033eadcd5c4fc4d41b0f9d1a5821d949ae..8faa9495404d581c065579aa8552efd33364539e 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "common/scaled-font-buffer.h"
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
@@ -10,7 +11,6 @@
 #include "common/graphic-helpers.h"
 #include "common/mem.h"
 #include "common/scaled-scene-buffer.h"
-#include "common/scaled-font-buffer.h"
 #include "common/string-helpers.h"
 
 static struct lab_data_buffer *
index bb9ca9eb76c7dd79326b362b4ee9cb94c3323c96..62cb301e4b50c8e1e1ab3757d724ed8fa4597961 100644 (file)
@@ -1,12 +1,12 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "common/scaled-icon-buffer.h"
 #include <assert.h>
 #include <string.h>
 #include <wlr/util/log.h>
 #include "buffer.h"
 #include "common/macros.h"
 #include "common/mem.h"
-#include "common/scaled-icon-buffer.h"
 #include "common/scaled-scene-buffer.h"
 #include "common/string-helpers.h"
 #include "config.h"
index 817e222c853bfc7527ee6e8795fd4ae520c1c074..c66ada7ce76cb0c694e0248ec65dd4491b97ff52 100644 (file)
@@ -1,11 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "common/scaled-img-buffer.h"
 #include <assert.h>
 #include <wayland-server-core.h>
 #include <wlr/types/wlr_scene.h>
 #include "buffer.h"
 #include "common/mem.h"
-#include "common/scaled-img-buffer.h"
 #include "common/scaled-scene-buffer.h"
 #include "img/img.h"
 #include "node.h"
index 39ac44dc68f0a2b4dbb9c94485df2d5028ac87d6..a86077f54dae6eb3ac35130b6c26d3ca66ab7661 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "common/scaled-scene-buffer.h"
 #include <assert.h>
 #include <stdlib.h>
 #include <wayland-server-core.h>
@@ -11,7 +12,6 @@
 #include "common/list.h"
 #include "common/macros.h"
 #include "common/mem.h"
-#include "common/scaled-scene-buffer.h"
 #include "node.h"
 
 /*
index e40e41cc16ce90bcc23e5a54ed73c6f50a285891..9b787b262662b51a9e2b3ace023b0e043d4172ac 100644 (file)
@@ -1,12 +1,12 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
+#include "common/scene-helpers.h"
 #include <assert.h>
 #include <wlr/types/wlr_output.h>
 #include <wlr/types/wlr_scene.h>
 #include <wlr/util/log.h>
 #include <wlr/util/region.h>
 #include <wlr/util/transform.h>
-#include "common/scene-helpers.h"
 #include "labwc.h"
 #include "magnifier.h"
 #include "output-state.h"
index 64df2717bcdd0dbe6c1aa12ee954e9eeb71a9b5b..dffc9a86cdbfcebbda7be962697c3e7eaea478d7 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
-#include <wlr/util/log.h>
 #include "common/set.h"
+#include <wlr/util/log.h>
 
 bool
 lab_set_contains(struct lab_set *set, uint32_t value)
index 6e8e7c51b021137495f9212e61d21400b56ac342..51de6b4acc4a2085d99390e3cf72dd155c6fb9b8 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "common/spawn.h"
 #include <assert.h>
 #include <fcntl.h>
 #include <glib.h>
@@ -9,7 +10,6 @@
 #include <sys/wait.h>
 #include <unistd.h>
 #include <wlr/util/log.h>
-#include "common/spawn.h"
 #include "common/fd-util.h"
 
 static void
index f94e1dd9fafd8e55071aa3aad5d3996bcb752f53..2d8f8de3ec6736c5d602e7e71fdbfc6dd3b0674e 100644 (file)
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "common/string-helpers.h"
 #include <assert.h>
 #include <ctype.h>
 #include <stdarg.h>
@@ -7,7 +8,6 @@
 #include <string.h>
 #include <strings.h>
 #include "common/mem.h"
-#include "common/string-helpers.h"
 
 enum str_flags {
        STR_FLAG_NONE = 0,
index e173aa101fa1f01c0fb131a6aa5cf1199499247b..f13a4d6e07e7de4acfee4fc4952ece6b552521d2 100644 (file)
@@ -1,8 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "common/surface-helpers.h"
 #include <wlr/types/wlr_layer_shell_v1.h>
 #include <wlr/types/wlr_subcompositor.h>
 #include <wlr/util/log.h>
-#include "common/surface-helpers.h"
 
 struct wlr_layer_surface_v1 *
 subsurface_parent_layer(struct wlr_surface *wlr_surface)
index d59b64eb67f5799b4c7cc95143807160a515ff87..7560cb16bfa9e7ddb91b9d0d3503f9447c5f5f38 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "config/keybind.h"
 #include <assert.h>
 #include <glib.h>
 #include <stdio.h>
@@ -8,7 +9,6 @@
 #include <wlr/util/log.h>
 #include "common/list.h"
 #include "common/mem.h"
-#include "config/keybind.h"
 #include "config/rcxml.h"
 #include "labwc.h"
 
index c76a9ff924d72c930d95d2a47341c55337513e8c..f8f48f18a137204f4ed59ed5a8500b934ab64b1b 100644 (file)
@@ -1,10 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "config/libinput.h"
 #include <string.h>
 #include <strings.h>
 #include "common/mem.h"
 #include "common/list.h"
 #include "common/string-helpers.h"
-#include "config/libinput.h"
 #include "config/rcxml.h"
 
 static void
index 19169d555c511d6b7218b7c449d4909aebe4bebc..0f49b6a516cd7a629baa885ffb492a898e0d734f 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "config/mousebind.h"
 #include <assert.h>
 #include <linux/input-event-codes.h>
 #include <strings.h>
@@ -7,7 +8,6 @@
 #include <wlr/util/log.h>
 #include "common/list.h"
 #include "common/mem.h"
-#include "config/mousebind.h"
 #include "config/rcxml.h"
 
 uint32_t
index 5dea021a8c8a4f96a4e81e9653498279d0b14c13..e8c4185e74c9cb874f57e30790ffcb07275a8efc 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "config/rcxml.h"
 #include <assert.h>
 #include <fcntl.h>
 #include <glib.h>
@@ -29,7 +30,6 @@
 #include "config/libinput.h"
 #include "config/mousebind.h"
 #include "config/tablet.h"
-#include "config/rcxml.h"
 #include "labwc.h"
 #include "osd.h"
 #include "regions.h"
index 5408bbcb0ac2708781e5fea436a52e6ca92c14e7..4ce24c57b2b00dfb2eb05307a3bc587a7046430d 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "config/session.h"
 #include <assert.h>
 #include <dirent.h>
 #include <stdbool.h>
@@ -18,7 +19,6 @@
 #include "common/parse-bool.h"
 #include "common/spawn.h"
 #include "common/string-helpers.h"
-#include "config/session.h"
 #include "labwc.h"
 
 static const char *const env_vars[] = {
index 7e1714109b2d165e18dcc155a44c57179b10b7f0..61e23ba5c99665bca05f6ef610e2fb2ee48a1102 100644 (file)
@@ -1,8 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "config/tablet-tool.h"
 #include <strings.h>
 #include <wlr/util/log.h>
-#include "config/tablet-tool.h"
 
 enum motion
 tablet_parse_motion(const char *name)
index b7d16c2466ec6e88f8f68727a5729979f8b9b739..4ac521787d820a73e73fa4dba99ea8412dc37915 100644 (file)
@@ -1,11 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "config/tablet.h"
 #include <linux/input-event-codes.h>
 #include <stdint.h>
 #include <strings.h>
 #include <wlr/util/log.h>
 #include "common/parse-double.h"
-#include "config/tablet.h"
 #include "config/rcxml.h"
 #include "input/tablet-pad.h"
 
index 0ff530e85d0a9d6b46cda392a3b45632b772f9e1..fde785e14451ba860f88a64fec9231055c2c5074 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "config/touch.h"
 #include <strings.h>
 #include <wlr/util/log.h>
 #include "common/list.h"
index 4123187b60e337d8eebe57b6bafb93846e3ab2d4..e482a357156d32d72c85992224a3da492ebae151 100644 (file)
@@ -1,10 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "debug.h"
 #include <wlr/types/wlr_layer_shell_v1.h>
 #include <wlr/types/wlr_scene.h>
 #include "common/lab-scene-rect.h"
 #include "common/scene-helpers.h"
 #include "common/string-helpers.h"
-#include "debug.h"
 #include "input/ime.h"
 #include "labwc.h"
 #include "node.h"
index 05e0168aae002f95e91298ce67655b0d074d653d..6fc842a82460a3cd8142f167cfa7de9492736bd0 100644 (file)
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "desktop-entry.h"
 #include <sfdo-desktop.h>
 #include <sfdo-icon.h>
 #include <sfdo-basedir.h>
@@ -9,7 +10,6 @@
 #include "common/macros.h"
 #include "common/mem.h"
 #include "common/string-helpers.h"
-#include "desktop-entry.h"
 #include "img/img.h"
 
 #include "labwc.h"
index eeca114a389653c8cf5ed267e1f5c2cb934f0d1a..b09ca26134b2e0b5f080e6a8aaef41e0717bbf75 100644 (file)
--- a/src/dnd.c
+++ b/src/dnd.c
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "dnd.h"
 #include <assert.h>
 #include <wlr/types/wlr_data_device.h>
 #include <wlr/types/wlr_scene.h>
 #include <wlr/util/log.h>
-#include "dnd.h"
 #include "input/cursor.h"
 #include "labwc.h"  /* for struct seat */
 #include "view.h"
index 50b7e6155e1afcfe568f3f4b57866da9a7a4b1db..237991a2d946f0f5e823cbbeb2640a84c6e3cea8 100644 (file)
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "edges.h"
 #include <assert.h>
 #include <limits.h>
 #include <pixman.h>
@@ -8,7 +9,6 @@
 #include "common/box.h"
 #include "common/macros.h"
 #include "config/rcxml.h"
-#include "edges.h"
 #include "labwc.h"
 #include "view.h"
 #include "node.h"
index 568b680f3db077567e228789ff73ad53d9cabb2f..611fe938f61bf04eb8eea8d11a063f597931c425 100644 (file)
@@ -1,11 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
+#include "idle.h"
 #include <assert.h>
 #include <stdlib.h>
 #include <wlr/types/wlr_idle_notify_v1.h>
 #include <wlr/types/wlr_idle_inhibit_v1.h>
 #include "common/mem.h"
-#include "idle.h"
 
 struct lab_idle_inhibitor {
        struct wlr_idle_inhibitor_v1 *wlr_inhibitor;
index 79aeafffc67a649e307f7409ef89719dc8262be6..5e151f21884f4bafe75889d15d62c30ad4e5ae43 100644 (file)
@@ -3,6 +3,7 @@
  * Copyright (C) Johan Malm 2023
  */
 #define _POSIX_C_SOURCE 200809L
+#include "img/img-png.h"
 #include <assert.h>
 #include <cairo.h>
 #include <png.h>
@@ -12,7 +13,6 @@
 #include <wlr/util/log.h>
 #include "buffer.h"
 #include "common/string-helpers.h"
-#include "img/img-png.h"
 
 /*
  * cairo_image_surface_create_from_png() does not gracefully handle non-png
index bf671dc4813ee342ff7eaa10036bcd9b07eac084..ad2d2916cda65a4994fe293db17f3dd7c0f60d38 100644 (file)
@@ -3,6 +3,7 @@
  * Copyright (C) Johan Malm 2023
  */
 #define _POSIX_C_SOURCE 200809L
+#include "img/img-svg.h"
 #include <cairo.h>
 #include <librsvg/rsvg.h>
 #include <stdbool.h>
@@ -11,7 +12,6 @@
 #include <wlr/util/log.h>
 #include "buffer.h"
 #include "common/string-helpers.h"
-#include "img/img-svg.h"
 #include "labwc.h"
 
 RsvgHandle *
index 7f1571e4236273d6ca44b15c28fef60e17cc2506..0a402d39ac3e23971e52b0f8ad4f654e26b6ae19 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #define _POSIX_C_SOURCE 200809L
+#include "img/img-xbm.h"
 #include <assert.h>
 #include <stdbool.h>
 #include <stdint.h>
@@ -14,7 +15,6 @@
 #include <string.h>
 #include <drm_fourcc.h>
 #include "img/img.h"
-#include "img/img-xbm.h"
 #include "common/grab-file.h"
 #include "common/mem.h"
 #include "common/string-helpers.h"
index ad50bc5eac3b4b1aa1f4fd278fadec42c3c777f7..0d251b4935f320c7340d2fa71443024e3bd2a923 100644 (file)
@@ -11,6 +11,7 @@
  * Adapted for labwc by John Lindgren, 2024
  */
 
+#include "img/img-xpm.h"
 #include <glib.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -21,7 +22,6 @@
 #include "common/buf.h"
 #include "common/graphic-helpers.h"
 #include "common/mem.h"
-#include "img/img-xpm.h"
 
 enum buf_op { op_header, op_cmap, op_body };
 
index 03b9130a9b85b28ccf615ff30c644b0f2bcdf455..d062022e8428bbdee04934947984c495e6ae3d4d 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
+#include "img/img.h"
 #include <assert.h>
 #include <wlr/util/log.h>
 #include "buffer.h"
@@ -9,7 +10,6 @@
 #include "common/macros.h"
 #include "common/mem.h"
 #include "common/string-helpers.h"
-#include "img/img.h"
 #include "img/img-png.h"
 #if HAVE_RSVG
 #include "img/img-svg.h"
index a0d9b3fd05918e8dc803fa166fd4521fc92d3d87..be2928229c8de6540476b0a4ad48d9cb4d5fce73 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "input/cursor.h"
 #include <assert.h>
 #include <linux/input-event-codes.h>
 #include <sys/time.h>
index 4cb94c6f98614462d2aed5c730251c19cbb7df24..5a0365fe5b236067805a394e2c694421e1d3acbc 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "input/gestures.h"
 #include <wlr/types/wlr_pointer_gestures_v1.h>
 #include "common/macros.h"
-#include "input/gestures.h"
 #include "labwc.h"
 #include "idle.h"
 
index e76b2f2c6c2f90edec4b79df5eb76672e9f15530..0cb656de0dfd972f8b208c0c772e6c53f829a7e4 100644 (file)
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /* Based on Sway (https://github.com/swaywm/sway) */
 
+#include "input/ime.h"
 #include <assert.h>
 #include "common/mem.h"
-#include "input/ime.h"
 #include "node.h"
 #include "view.h"
 
index d78dca1ac6731e44cc334a3011e363bbeac56c32..61afdc6dd37096a3d19adc3ed9b959e661cd5bf8 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
-#include "input/cursor.h"
 #include "input/input.h"
+#include "input/cursor.h"
 #include "input/keyboard.h"
 
 void
index 24a3f606c97c77c4cfcc015d71ef7030ea3344a2..12992615ac67f894b36f940b05eeb991a8ee2f63 100644 (file)
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "input/key-state.h"
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -6,7 +7,6 @@
 #include <string.h>
 #include <wlr/util/log.h>
 #include "common/set.h"
-#include "input/key-state.h"
 
 static struct lab_set pressed, bound, pressed_sent;
 
index 0739529d0af38e1b82a20b96138c6593a8ae4993..4c2a0704dc5388ec1aece2936562cc5854f186e1 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "input/keyboard.h"
 #include <assert.h>
 #include <stdlib.h>
 #include <wlr/backend/multi.h>
@@ -10,7 +11,6 @@
 #include "common/three-state.h"
 #include "idle.h"
 #include "input/ime.h"
-#include "input/keyboard.h"
 #include "input/key-state.h"
 #include "labwc.h"
 #include "menu/menu.h"
index 2453be96b9dfd2601e6441fec3a3726aea8be452..19127058e6ffd1a9c98e3b018959119077d82b6c 100644 (file)
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "input/tablet-pad.h"
 #include <assert.h>
 #include <stdlib.h>
 #include <wlr/backend/libinput.h>
@@ -9,7 +10,6 @@
 #include "common/mem.h"
 #include "config/rcxml.h"
 #include "input/cursor.h"
-#include "input/tablet-pad.h"
 #include "input/tablet.h"
 #include "labwc.h"
 
index a4ec328ab64b4892e935bf232af4c92e2aa03463..c53c7d7075baff1641e284d2a9770adf924d4d84 100644 (file)
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "input/tablet.h"
 #include <assert.h>
 #include <stdlib.h>
 #include <linux/input-event-codes.h>
@@ -12,7 +13,6 @@
 #include "config/rcxml.h"
 #include "config/mousebind.h"
 #include "input/cursor.h"
-#include "input/tablet.h"
 #include "input/tablet-pad.h"
 #include "labwc.h"
 #include "idle.h"
index ec6a2bf760804adc8a0af11ea7eb0b6ab2467b79..2cc797849de0b3dbe67b9c196efddf2d15d6f019 100644 (file)
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "input/touch.h"
 #include <wayland-util.h>
 #include <wlr/types/wlr_touch.h>
 #include <linux/input-event-codes.h>
@@ -6,7 +7,6 @@
 #include "common/mem.h"
 #include "common/scene-helpers.h"
 #include "idle.h"
-#include "input/touch.h"
 #include "labwc.h"
 #include "config/mousebind.h"
 #include "action.h"
index 2ae560df2c0a27a506c04beccdb0d8ac350e0a76..44a2e13162cf37f5dde7152087621da19fce9655 100644 (file)
@@ -6,6 +6,7 @@
  * Copyright (C) 2019 Drew DeVault and Sway developers
  */
 
+#include "layers.h"
 #include <assert.h>
 #include <stdbool.h>
 #include <stdlib.h>
@@ -18,7 +19,6 @@
 #include "common/macros.h"
 #include "common/mem.h"
 #include "config/rcxml.h"
-#include "layers.h"
 #include "labwc.h"
 #include "node.h"
 
index 0846e02ad343b3d06e1e87e03b8bc723c46e683f..9fb5b264e8d264479e8e8050595f3bc5e1229931 100644 (file)
@@ -1,12 +1,12 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
+#include "magnifier.h"
 #include <assert.h>
 #include <wlr/render/swapchain.h>
 #include <wlr/types/wlr_output.h>
 #include <wlr/util/transform.h>
 #include "common/box.h"
 #include "labwc.h"
-#include "magnifier.h"
 #include "theme.h"
 
 static bool magnify_on;
index dd9f7f597f3fc2140e207125d50033379aa27284..a44790eb1fba7a730e7b8f4259a28ca989615881 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "menu/menu.h"
 #include <assert.h>
 #include <libxml/parser.h>
 #include <libxml/tree.h>
@@ -25,7 +26,6 @@
 #include "common/spawn.h"
 #include "common/string-helpers.h"
 #include "labwc.h"
-#include "menu/menu.h"
 #include "workspaces.h"
 #include "view.h"
 #include "node.h"
index 10d79a237aed032f1fd64c8a38bc35d35fa76ff7..ae47044cf8e93777b01988b8ae6a4a44ccd294f3 100644 (file)
@@ -1,8 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "node.h"
 #include <assert.h>
 #include <stdlib.h>
 #include "common/mem.h"
-#include "node.h"
 
 static void
 descriptor_destroy(struct node_descriptor *node_descriptor)
index 9213a1b3ce53d9adec64c7bd8cbb748090b825e8..89ba415dab28ddcee4f49130822db2f95b813362 100644 (file)
--- a/src/osd.c
+++ b/src/osd.c
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "osd.h"
 #include <assert.h>
 #include <cairo.h>
 #include <wlr/util/log.h>
@@ -15,7 +16,6 @@
 #include "config/rcxml.h"
 #include "labwc.h"
 #include "node.h"
-#include "osd.h"
 #include "theme.h"
 #include "view.h"
 #include "window-rules.h"
index 62e2c4d11fae45630da7170d33002951eb0a56b5..7ebcc19eae1c0227265c76e4ca4a121f80970633 100644 (file)
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
+#include "output-state.h"
 #include <wlr/types/wlr_output.h>
 #include <wlr/types/wlr_output_management_v1.h>
 #include "labwc.h"
-#include "output-state.h"
 
 void
 output_state_init(struct output *output)
index 3853c9ef960e49a3d1743f6765895597b296477f..888f832bc618eef913a0d0e78407bdb7abe27d0b 100644 (file)
@@ -1,11 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
+#include "output-virtual.h"
 #include <stdlib.h>
 #include <wlr/backend/headless.h>
 #include <wlr/types/wlr_output.h>
 #include "common/string-helpers.h"
 #include "labwc.h"
-#include "output-virtual.h"
 
 static struct wlr_output *fallback_output = NULL;
 
index 354f5ad97e6e6705bee41b7284331f0c0fba3d7e..78a9c1724a5d0c483aec2a5749fd4c8682c5b2ed 100644 (file)
@@ -1,8 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "overlay.h"
 #include <assert.h>
 #include "common/lab-scene-rect.h"
 #include "labwc.h"
-#include "overlay.h"
 #include "view.h"
 #include "theme.h"
 
index 1e4fd937932ffae20c326ffd54b35e3590f02c51..c037703815bc278403030e191fd5f194786482a9 100644 (file)
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "placement.h"
 #include <assert.h>
 #include <limits.h>
 #include <stdbool.h>
@@ -6,7 +7,6 @@
 #include "common/macros.h"
 #include "common/mem.h"
 #include "labwc.h"
-#include "placement.h"
 #include "ssd.h"
 #include "view.h"
 
index c4678497b29a952e6710f80e3c22bb55a2ee511a..808a209685f9860f9be086bd10d98dceae15c3b2 100644 (file)
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "protocols/transaction-addon.h"
 #include <assert.h>
 #include <wayland-server-core.h>
 #include "common/list.h"
 #include "common/mem.h"
-#include "protocols/transaction-addon.h"
 
 void
 lab_transaction_op_destroy(struct lab_transaction_op *trans_op)
index 112cc6e3c96b0249fc57b742bf3bda2d062724c7..3463c97fddd23ed72f4c9fa121efad355993e3a3 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
 #define _POSIX_C_SOURCE 200809L
+#include "regions.h"
 #include <assert.h>
 #include <float.h>
 #include <math.h>
@@ -12,7 +13,6 @@
 #include "common/mem.h"
 #include "input/keyboard.h"
 #include "labwc.h"
-#include "regions.h"
 #include "view.h"
 
 bool
index bc1bf8ad4ca52bfb2f385eeeb8846185ab1d990f..2f09c0e9e8ce298231c25b8b8468c9c7db5a75e1 100644 (file)
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "resistance.h"
 #include <assert.h>
 #include <limits.h>
 #include "common/border.h"
@@ -6,7 +7,6 @@
 #include "config/rcxml.h"
 #include "edges.h"
 #include "labwc.h"
-#include "resistance.h"
 #include "snap-constraints.h"
 #include "view.h"
 
index 9186bc6f32ccb932264ee1d74362073c708034f8..fd52241952a2fb58314480f3dcb15686b23d3bd4 100644 (file)
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
+#include "resize-outlines.h"
 #include <wlr/types/wlr_scene.h>
 #include "common/lab-scene-rect.h"
 #include "ssd.h"
-#include "resize-outlines.h"
 #include "labwc.h"
 
 bool
index 0a140ca6a5a01859129dfd8d04c3937ae1882865..fe11856672d298977ce857ad06d47c014bf03ffa 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "session-lock.h"
 #include <assert.h>
 #include "common/mem.h"
 #include "labwc.h"
index bc1ffd14890de02c3b2fd9db7fc477f9a0ed3e1f..04eed5f7b82c51d3c3a964907bcb4b48389ed56c 100644 (file)
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "snap-constraints.h"
 #include <assert.h>
 #include <wlr/util/box.h>
 #include "common/macros.h"
 #include "labwc.h"
-#include "snap-constraints.h"
 #include "view.h"
 
 /*
index 228572fa5bace6dcb267e95320cf4b48bf21eea8..4e8e1d4421552f6763d4b6a352ad307ab43e950d 100644 (file)
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "snap.h"
 #include <assert.h>
 #include <limits.h>
 #include <wlr/util/box.h>
@@ -7,7 +8,6 @@
 #include "edges.h"
 #include "labwc.h"
 #include "snap-constraints.h"
-#include "snap.h"
 #include "view.h"
 
 static void
index 5fe9c1a2ee726140410ee2b2c7564dc8307cad46..961c640b49353f62e035cabe6b8da5eb10681983 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #define _POSIX_C_SOURCE 200809L
+#include "theme.h"
 #include "config.h"
 #include <assert.h>
 #include <cairo.h>
@@ -30,7 +31,6 @@
 #include "config/rcxml.h"
 #include "img/img.h"
 #include "labwc.h"
-#include "theme.h"
 #include "buffer.h"
 #include "ssd.h"
 
index 3357367b63b40493dcd9af72f9a370b4a4667e2b..9e2c1243907cfb9a8a015f8bfaae94156cf1e7ab 100644 (file)
@@ -1,11 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /* view-impl-common.c: common code for shell view->impl functions */
+#include "view-impl-common.h"
 #include <stdio.h>
 #include <strings.h>
 #include "foreign-toplevel.h"
 #include "labwc.h"
 #include "view.h"
-#include "view-impl-common.h"
 #include "window-rules.h"
 
 void
index 3a6fa0bd148e59239a2984bd79caa2e8a577b4cb..98c61d924323865b36331ccf09f584ff2b2f5a1d 100644 (file)
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
+#include "view.h"
 #include <assert.h>
 #include <stdio.h>
 #include <strings.h>
@@ -25,7 +26,6 @@
 #include "snap-constraints.h"
 #include "snap.h"
 #include "ssd.h"
-#include "view.h"
 #include "window-rules.h"
 #include "wlr/util/log.h"
 #include "workspaces.h"
index fa21f749e93e3de5e32a15f8cc107907568eb06a..ed980efc4edcbfc30d23275ce9a892a239c7900e 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "window-rules.h"
 #include <assert.h>
 #include <stdbool.h>
 #include <cairo.h>
@@ -11,7 +12,6 @@
 #include "config/rcxml.h"
 #include "labwc.h"
 #include "view.h"
-#include "window-rules.h"
 
 static bool
 other_instances_exist(struct view *self, struct view_query *query)
index 45b2f9189c45e428eabb40ffe5fd676631049a18..fc1cd52468d883bf98dc17a5ced729fbc1db8d94 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "workspaces.h"
 #include <assert.h>
 #include <cairo.h>
 #include <pango/pangocairo.h>
@@ -18,7 +19,6 @@
 #include "protocols/cosmic-workspaces.h"
 #include "protocols/ext-workspace.h"
 #include "view.h"
-#include "workspaces.h"
 #include "xwayland.h"
 
 #define COSMIC_WORKSPACES_VERSION 1
index a3b85dc7ab3ea29f8734aec62ce0d2c6e8aa3960..fae5b659ce940b67d028de0066e5cc0641f2464e 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #define _POSIX_C_SOURCE 200809L
+#include "xwayland.h"
 #include <assert.h>
 #include <stdlib.h>
 #include <wlr/xwayland.h>
@@ -17,7 +18,6 @@
 #include "view-impl-common.h"
 #include "window-rules.h"
 #include "workspaces.h"
-#include "xwayland.h"
 
 enum atoms {
        ATOM_NET_WM_ICON = 0,