aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2024-05-25 00:02:48 +0200
committerFurkan Sahin <furkan-dev@proton.me>2024-05-25 00:02:48 +0200
commit6f044656d10446a1ad5e708866f5fd79dfaf68c5 (patch)
treef729d10af593d47a3e52d2e76a975c6edae02f33
parentcc0963e7eaa2e595267b3a807b62cbb823bca7cd (diff)
Drop server.h include from input/input-manager.h
The only reason it's included there is for a declaration of struct sway_server, but we can just forward-declare it. This avoids rebuilding almost all of Sway when touching server.h. All other server.h includes are from source files, not headers.
-rw-r--r--include/sway/criteria.h4
-rw-r--r--include/sway/input/input-manager.h3
-rw-r--r--sway/commands/input/events.c1
-rw-r--r--sway/commands/input/xkb_switch_layout.c1
-rw-r--r--sway/commands/move.c1
-rw-r--r--sway/commands/seat/cursor.c1
-rw-r--r--sway/commands/seat/pointer_constraint.c1
-rw-r--r--sway/commands/seat/shortcuts_inhibitor.c1
-rw-r--r--sway/commands/shortcuts_inhibitor.c1
-rw-r--r--sway/config.c1
-rw-r--r--sway/config/bar.c1
-rw-r--r--sway/config/input.c1
-rw-r--r--sway/config/output.c1
-rw-r--r--sway/criteria.c1
-rw-r--r--sway/desktop/launcher.c1
-rw-r--r--sway/desktop/transaction.c1
-rw-r--r--sway/input/cursor.c1
-rw-r--r--sway/input/keyboard.c1
-rw-r--r--sway/input/seatop_default.c1
-rw-r--r--sway/input/switch.c1
-rw-r--r--sway/input/tablet.c1
-rw-r--r--sway/input/text_input.c2
-rw-r--r--sway/ipc-json.c1
-rw-r--r--sway/tree/workspace.c1
24 files changed, 29 insertions, 1 deletions
diff --git a/include/sway/criteria.h b/include/sway/criteria.h
index 758d70ed..ae546821 100644
--- a/include/sway/criteria.h
+++ b/include/sway/criteria.h
@@ -7,6 +7,10 @@
#include "list.h"
#include "tree/view.h"
+#if WLR_HAS_XWAYLAND
+#include "sway/xwayland.h"
+#endif
+
enum criteria_type {
CT_COMMAND = 1 << 0,
CT_ASSIGN_OUTPUT = 1 << 1,
diff --git a/include/sway/input/input-manager.h b/include/sway/input/input-manager.h
index 45c75199..b014e18f 100644
--- a/include/sway/input/input-manager.h
+++ b/include/sway/input/input-manager.h
@@ -5,10 +5,11 @@
#include <wlr/types/wlr_virtual_keyboard_v1.h>
#include <wlr/types/wlr_virtual_pointer_v1.h>
#include <wlr/types/wlr_transient_seat_v1.h>
-#include "sway/server.h"
#include "sway/config.h"
#include "list.h"
+struct sway_server;
+
struct sway_input_device {
char *identifier;
struct wlr_input_device *wlr_device;
diff --git a/sway/commands/input/events.c b/sway/commands/input/events.c
index 08d99bf0..3cea026e 100644
--- a/sway/commands/input/events.c
+++ b/sway/commands/input/events.c
@@ -5,6 +5,7 @@
#include "sway/config.h"
#include "sway/commands.h"
#include "sway/input/input-manager.h"
+#include "sway/server.h"
#include "log.h"
#if WLR_HAS_LIBINPUT_BACKEND
diff --git a/sway/commands/input/xkb_switch_layout.c b/sway/commands/input/xkb_switch_layout.c
index ecac8e6c..8d600fca 100644
--- a/sway/commands/input/xkb_switch_layout.c
+++ b/sway/commands/input/xkb_switch_layout.c
@@ -3,6 +3,7 @@
#include "sway/config.h"
#include "sway/commands.h"
#include "sway/input/input-manager.h"
+#include "sway/server.h"
#include "log.h"
struct xkb_switch_layout_action {
diff --git a/sway/commands/move.c b/sway/commands/move.c
index 8addf26e..ff656cfb 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -11,6 +11,7 @@
#include "sway/input/seat.h"
#include "sway/ipc-server.h"
#include "sway/output.h"
+#include "sway/server.h"
#include "sway/tree/arrange.h"
#include "sway/tree/container.h"
#include "sway/tree/root.h"
diff --git a/sway/commands/seat/cursor.c b/sway/commands/seat/cursor.c
index df7c379d..434e6bbb 100644
--- a/sway/commands/seat/cursor.c
+++ b/sway/commands/seat/cursor.c
@@ -5,6 +5,7 @@
#include <wlr/types/wlr_pointer.h>
#include "sway/commands.h"
#include "sway/input/cursor.h"
+#include "sway/server.h"
static struct cmd_results *press_or_release(struct sway_cursor *cursor,
char *action, char *button_str);
diff --git a/sway/commands/seat/pointer_constraint.c b/sway/commands/seat/pointer_constraint.c
index 3890ebde..38f85bcd 100644
--- a/sway/commands/seat/pointer_constraint.c
+++ b/sway/commands/seat/pointer_constraint.c
@@ -4,6 +4,7 @@
#include "sway/config.h"
#include "sway/input/cursor.h"
#include "sway/input/seat.h"
+#include "sway/server.h"
enum operation {
OP_ENABLE,
diff --git a/sway/commands/seat/shortcuts_inhibitor.c b/sway/commands/seat/shortcuts_inhibitor.c
index 7c7f99cf..df68618d 100644
--- a/sway/commands/seat/shortcuts_inhibitor.c
+++ b/sway/commands/seat/shortcuts_inhibitor.c
@@ -2,6 +2,7 @@
#include "sway/commands.h"
#include "sway/input/seat.h"
#include "sway/input/input-manager.h"
+#include "sway/server.h"
#include "util.h"
static struct cmd_results *handle_action(struct seat_config *sc,
diff --git a/sway/commands/shortcuts_inhibitor.c b/sway/commands/shortcuts_inhibitor.c
index ffa1a5c9..2dfd1b9f 100644
--- a/sway/commands/shortcuts_inhibitor.c
+++ b/sway/commands/shortcuts_inhibitor.c
@@ -3,6 +3,7 @@
#include "sway/commands.h"
#include "sway/config.h"
#include "sway/input/seat.h"
+#include "sway/server.h"
#include "sway/tree/container.h"
#include "sway/tree/view.h"
diff --git a/sway/config.c b/sway/config.c
index f9131e0f..5058efcc 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -23,6 +23,7 @@
#include "sway/config.h"
#include "sway/criteria.h"
#include "sway/desktop/transaction.h"
+#include "sway/server.h"
#include "sway/swaynag.h"
#include "sway/tree/arrange.h"
#include "sway/tree/root.h"
diff --git a/sway/config/bar.c b/sway/config/bar.c
index 908b2865..ecefb61a 100644
--- a/sway/config/bar.c
+++ b/sway/config/bar.c
@@ -12,6 +12,7 @@
#include "sway/config.h"
#include "sway/input/keyboard.h"
#include "sway/output.h"
+#include "sway/server.h"
#include "config.h"
#include "list.h"
#include "log.h"
diff --git a/sway/config/input.c b/sway/config/input.c
index de3b21ed..613270df 100644
--- a/sway/config/input.c
+++ b/sway/config/input.c
@@ -3,6 +3,7 @@
#include <float.h>
#include "sway/config.h"
#include "sway/input/keyboard.h"
+#include "sway/server.h"
#include "log.h"
struct input_config *new_input_config(const char* identifier) {
diff --git a/sway/config/output.c b/sway/config/output.c
index e7299459..9a447388 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -13,6 +13,7 @@
#include "sway/config.h"
#include "sway/input/cursor.h"
#include "sway/output.h"
+#include "sway/server.h"
#include "sway/tree/root.h"
#include "log.h"
#include "util.h"
diff --git a/sway/criteria.c b/sway/criteria.c
index 13f0530e..2b7290c0 100644
--- a/sway/criteria.c
+++ b/sway/criteria.c
@@ -7,6 +7,7 @@
#include "sway/criteria.h"
#include "sway/tree/container.h"
#include "sway/config.h"
+#include "sway/server.h"
#include "sway/tree/root.h"
#include "sway/tree/view.h"
#include "sway/tree/workspace.h"
diff --git a/sway/desktop/launcher.c b/sway/desktop/launcher.c
index 28043d19..2362e1ba 100644
--- a/sway/desktop/launcher.c
+++ b/sway/desktop/launcher.c
@@ -4,6 +4,7 @@
#include "sway/input/seat.h"
#include "sway/output.h"
#include "sway/desktop/launcher.h"
+#include "sway/server.h"
#include "sway/tree/node.h"
#include "sway/tree/container.h"
#include "sway/tree/workspace.h"
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index e464ff1a..d1898843 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -10,6 +10,7 @@
#include "sway/input/cursor.h"
#include "sway/input/input-manager.h"
#include "sway/output.h"
+#include "sway/server.h"
#include "sway/tree/container.h"
#include "sway/tree/node.h"
#include "sway/tree/view.h"
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 0b4a36d9..235951d4 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -25,6 +25,7 @@
#include "sway/layers.h"
#include "sway/output.h"
#include "sway/scene_descriptor.h"
+#include "sway/server.h"
#include "sway/tree/container.h"
#include "sway/tree/root.h"
#include "sway/tree/view.h"
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c
index f74d0658..9ac21664 100644
--- a/sway/input/keyboard.c
+++ b/sway/input/keyboard.c
@@ -13,6 +13,7 @@
#include "sway/input/seat.h"
#include "sway/input/cursor.h"
#include "sway/ipc-server.h"
+#include "sway/server.h"
#include "log.h"
#if WLR_HAS_SESSION
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c
index e01fa933..f4a0f463 100644
--- a/sway/input/seatop_default.c
+++ b/sway/input/seatop_default.c
@@ -11,6 +11,7 @@
#include "sway/input/tablet.h"
#include "sway/layers.h"
#include "sway/output.h"
+#include "sway/server.h"
#include "sway/scene_descriptor.h"
#include "sway/tree/view.h"
#include "sway/tree/workspace.h"
diff --git a/sway/input/switch.c b/sway/input/switch.c
index 831f4dbf..6aab4ad0 100644
--- a/sway/input/switch.c
+++ b/sway/input/switch.c
@@ -1,5 +1,6 @@
#include "sway/config.h"
#include "sway/input/switch.h"
+#include "sway/server.h"
#include "log.h"
struct sway_switch *sway_switch_create(struct sway_seat *seat,
diff --git a/sway/input/tablet.c b/sway/input/tablet.c
index 2863642a..ec1e4f68 100644
--- a/sway/input/tablet.c
+++ b/sway/input/tablet.c
@@ -7,6 +7,7 @@
#include "sway/input/cursor.h"
#include "sway/input/seat.h"
#include "sway/input/tablet.h"
+#include "sway/server.h"
#if WLR_HAS_LIBINPUT_BACKEND
#include <wlr/backend/libinput.h>
diff --git a/sway/input/text_input.c b/sway/input/text_input.c
index ba8c0b99..580a9f54 100644
--- a/sway/input/text_input.c
+++ b/sway/input/text_input.c
@@ -9,6 +9,8 @@
#include "sway/input/text_input.h"
#include "sway/input/text_input_popup.h"
#include "sway/layers.h"
+#include "sway/server.h"
+
static void input_popup_update(struct sway_input_popup *popup);
static struct sway_text_input *relay_get_focusable_text_input(
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index b7370aa6..1ee39124 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -11,6 +11,7 @@
#include "log.h"
#include "sway/config.h"
#include "sway/ipc-json.h"
+#include "sway/server.h"
#include "sway/tree/container.h"
#include "sway/tree/view.h"
#include "sway/tree/workspace.h"
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index a68dc927..52e48ad5 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -10,6 +10,7 @@
#include "sway/input/seat.h"
#include "sway/ipc-server.h"
#include "sway/output.h"
+#include "sway/server.h"
#include "sway/tree/arrange.h"
#include "sway/tree/container.h"
#include "sway/tree/node.h"