src: include primary header first

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).
This commit is contained in:
John Lindgren 2025-07-28 01:02:01 -04:00 committed by Johan Malm
parent c9b576982d
commit 31d42b50e2
74 changed files with 74 additions and 72 deletions

View 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>

View 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"

View 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"

View 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

View 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;

View 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"

View 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"

View 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"

View 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"