aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2024-05-25 00:02:48 +0200
committerLibravatar Simon Zeni <simon@bl4ckb0ne.ca>2024-05-27 09:28:43 -0400
commitd0bd591ee70b706182b6bfff45a68bc5404ea89b (patch)
treef729d10af593d47a3e52d2e76a975c6edae02f33
parentinput/text_input: ensure keyboard is set before sending modifiers (diff)
downloadsway-d0bd591ee70b706182b6bfff45a68bc5404ea89b.tar.gz
sway-d0bd591ee70b706182b6bfff45a68bc5404ea89b.tar.zst
sway-d0bd591ee70b706182b6bfff45a68bc5404ea89b.zip
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 @@
7#include "list.h" 7#include "list.h"
8#include "tree/view.h" 8#include "tree/view.h"
9 9
10#if WLR_HAS_XWAYLAND
11#include "sway/xwayland.h"
12#endif
13
10enum criteria_type { 14enum criteria_type {
11 CT_COMMAND = 1 << 0, 15 CT_COMMAND = 1 << 0,
12 CT_ASSIGN_OUTPUT = 1 << 1, 16 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 @@
5#include <wlr/types/wlr_virtual_keyboard_v1.h> 5#include <wlr/types/wlr_virtual_keyboard_v1.h>
6#include <wlr/types/wlr_virtual_pointer_v1.h> 6#include <wlr/types/wlr_virtual_pointer_v1.h>
7#include <wlr/types/wlr_transient_seat_v1.h> 7#include <wlr/types/wlr_transient_seat_v1.h>
8#include "sway/server.h"
9#include "sway/config.h" 8#include "sway/config.h"
10#include "list.h" 9#include "list.h"
11 10
11struct sway_server;
12
12struct sway_input_device { 13struct sway_input_device {
13 char *identifier; 14 char *identifier;
14 struct wlr_input_device *wlr_device; 15 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 @@
5#include "sway/config.h" 5#include "sway/config.h"
6#include "sway/commands.h" 6#include "sway/commands.h"
7#include "sway/input/input-manager.h" 7#include "sway/input/input-manager.h"
8#include "sway/server.h"
8#include "log.h" 9#include "log.h"
9 10
10#if WLR_HAS_LIBINPUT_BACKEND 11#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 @@
3#include "sway/config.h" 3#include "sway/config.h"
4#include "sway/commands.h" 4#include "sway/commands.h"
5#include "sway/input/input-manager.h" 5#include "sway/input/input-manager.h"
6#include "sway/server.h"
6#include "log.h" 7#include "log.h"
7 8
8struct xkb_switch_layout_action { 9struct 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 @@
11#include "sway/input/seat.h" 11#include "sway/input/seat.h"
12#include "sway/ipc-server.h" 12#include "sway/ipc-server.h"
13#include "sway/output.h" 13#include "sway/output.h"
14#include "sway/server.h"
14#include "sway/tree/arrange.h" 15#include "sway/tree/arrange.h"
15#include "sway/tree/container.h" 16#include "sway/tree/container.h"
16#include "sway/tree/root.h" 17#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 @@
5#include <wlr/types/wlr_pointer.h> 5#include <wlr/types/wlr_pointer.h>
6#include "sway/commands.h" 6#include "sway/commands.h"
7#include "sway/input/cursor.h" 7#include "sway/input/cursor.h"
8#include "sway/server.h"
8 9
9static struct cmd_results *press_or_release(struct sway_cursor *cursor, 10static struct cmd_results *press_or_release(struct sway_cursor *cursor,
10 char *action, char *button_str); 11 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 @@
4#include "sway/config.h" 4#include "sway/config.h"
5#include "sway/input/cursor.h" 5#include "sway/input/cursor.h"
6#include "sway/input/seat.h" 6#include "sway/input/seat.h"
7#include "sway/server.h"
7 8
8enum operation { 9enum operation {
9 OP_ENABLE, 10 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 @@
2#include "sway/commands.h" 2#include "sway/commands.h"
3#include "sway/input/seat.h" 3#include "sway/input/seat.h"
4#include "sway/input/input-manager.h" 4#include "sway/input/input-manager.h"
5#include "sway/server.h"
5#include "util.h" 6#include "util.h"
6 7
7static struct cmd_results *handle_action(struct seat_config *sc, 8static 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 @@
3#include "sway/commands.h" 3#include "sway/commands.h"
4#include "sway/config.h" 4#include "sway/config.h"
5#include "sway/input/seat.h" 5#include "sway/input/seat.h"
6#include "sway/server.h"
6#include "sway/tree/container.h" 7#include "sway/tree/container.h"
7#include "sway/tree/view.h" 8#include "sway/tree/view.h"
8 9
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 @@
23#include "sway/config.h" 23#include "sway/config.h"
24#include "sway/criteria.h" 24#include "sway/criteria.h"
25#include "sway/desktop/transaction.h" 25#include "sway/desktop/transaction.h"
26#include "sway/server.h"
26#include "sway/swaynag.h" 27#include "sway/swaynag.h"
27#include "sway/tree/arrange.h" 28#include "sway/tree/arrange.h"
28#include "sway/tree/root.h" 29#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 @@
12#include "sway/config.h" 12#include "sway/config.h"
13#include "sway/input/keyboard.h" 13#include "sway/input/keyboard.h"
14#include "sway/output.h" 14#include "sway/output.h"
15#include "sway/server.h"
15#include "config.h" 16#include "config.h"
16#include "list.h" 17#include "list.h"
17#include "log.h" 18#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 @@
3#include <float.h> 3#include <float.h>
4#include "sway/config.h" 4#include "sway/config.h"
5#include "sway/input/keyboard.h" 5#include "sway/input/keyboard.h"
6#include "sway/server.h"
6#include "log.h" 7#include "log.h"
7 8
8struct input_config *new_input_config(const char* identifier) { 9struct 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 @@
13#include "sway/config.h" 13#include "sway/config.h"
14#include "sway/input/cursor.h" 14#include "sway/input/cursor.h"
15#include "sway/output.h" 15#include "sway/output.h"
16#include "sway/server.h"
16#include "sway/tree/root.h" 17#include "sway/tree/root.h"
17#include "log.h" 18#include "log.h"
18#include "util.h" 19#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 @@
7#include "sway/criteria.h" 7#include "sway/criteria.h"
8#include "sway/tree/container.h" 8#include "sway/tree/container.h"
9#include "sway/config.h" 9#include "sway/config.h"
10#include "sway/server.h"
10#include "sway/tree/root.h" 11#include "sway/tree/root.h"
11#include "sway/tree/view.h" 12#include "sway/tree/view.h"
12#include "sway/tree/workspace.h" 13#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 @@
4#include "sway/input/seat.h" 4#include "sway/input/seat.h"
5#include "sway/output.h" 5#include "sway/output.h"
6#include "sway/desktop/launcher.h" 6#include "sway/desktop/launcher.h"
7#include "sway/server.h"
7#include "sway/tree/node.h" 8#include "sway/tree/node.h"
8#include "sway/tree/container.h" 9#include "sway/tree/container.h"
9#include "sway/tree/workspace.h" 10#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 @@
10#include "sway/input/cursor.h" 10#include "sway/input/cursor.h"
11#include "sway/input/input-manager.h" 11#include "sway/input/input-manager.h"
12#include "sway/output.h" 12#include "sway/output.h"
13#include "sway/server.h"
13#include "sway/tree/container.h" 14#include "sway/tree/container.h"
14#include "sway/tree/node.h" 15#include "sway/tree/node.h"
15#include "sway/tree/view.h" 16#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 @@
25#include "sway/layers.h" 25#include "sway/layers.h"
26#include "sway/output.h" 26#include "sway/output.h"
27#include "sway/scene_descriptor.h" 27#include "sway/scene_descriptor.h"
28#include "sway/server.h"
28#include "sway/tree/container.h" 29#include "sway/tree/container.h"
29#include "sway/tree/root.h" 30#include "sway/tree/root.h"
30#include "sway/tree/view.h" 31#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 @@
13#include "sway/input/seat.h" 13#include "sway/input/seat.h"
14#include "sway/input/cursor.h" 14#include "sway/input/cursor.h"
15#include "sway/ipc-server.h" 15#include "sway/ipc-server.h"
16#include "sway/server.h"
16#include "log.h" 17#include "log.h"
17 18
18#if WLR_HAS_SESSION 19#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 @@
11#include "sway/input/tablet.h" 11#include "sway/input/tablet.h"
12#include "sway/layers.h" 12#include "sway/layers.h"
13#include "sway/output.h" 13#include "sway/output.h"
14#include "sway/server.h"
14#include "sway/scene_descriptor.h" 15#include "sway/scene_descriptor.h"
15#include "sway/tree/view.h" 16#include "sway/tree/view.h"
16#include "sway/tree/workspace.h" 17#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 @@
1#include "sway/config.h" 1#include "sway/config.h"
2#include "sway/input/switch.h" 2#include "sway/input/switch.h"
3#include "sway/server.h"
3#include "log.h" 4#include "log.h"
4 5
5struct sway_switch *sway_switch_create(struct sway_seat *seat, 6struct 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 @@
7#include "sway/input/cursor.h" 7#include "sway/input/cursor.h"
8#include "sway/input/seat.h" 8#include "sway/input/seat.h"
9#include "sway/input/tablet.h" 9#include "sway/input/tablet.h"
10#include "sway/server.h"
10 11
11#if WLR_HAS_LIBINPUT_BACKEND 12#if WLR_HAS_LIBINPUT_BACKEND
12#include <wlr/backend/libinput.h> 13#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 @@
9#include "sway/input/text_input.h" 9#include "sway/input/text_input.h"
10#include "sway/input/text_input_popup.h" 10#include "sway/input/text_input_popup.h"
11#include "sway/layers.h" 11#include "sway/layers.h"
12#include "sway/server.h"
13
12static void input_popup_update(struct sway_input_popup *popup); 14static void input_popup_update(struct sway_input_popup *popup);
13 15
14static struct sway_text_input *relay_get_focusable_text_input( 16static 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 @@
11#include "log.h" 11#include "log.h"
12#include "sway/config.h" 12#include "sway/config.h"
13#include "sway/ipc-json.h" 13#include "sway/ipc-json.h"
14#include "sway/server.h"
14#include "sway/tree/container.h" 15#include "sway/tree/container.h"
15#include "sway/tree/view.h" 16#include "sway/tree/view.h"
16#include "sway/tree/workspace.h" 17#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 @@
10#include "sway/input/seat.h" 10#include "sway/input/seat.h"
11#include "sway/ipc-server.h" 11#include "sway/ipc-server.h"
12#include "sway/output.h" 12#include "sway/output.h"
13#include "sway/server.h"
13#include "sway/tree/arrange.h" 14#include "sway/tree/arrange.h"
14#include "sway/tree/container.h" 15#include "sway/tree/container.h"
15#include "sway/tree/node.h" 16#include "sway/tree/node.h"