summaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-09-01 08:18:37 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2016-09-01 08:18:37 -0400
commit416417a54c5875abcdc257b6ad10ff086c35eefc (patch)
tree00f20884a05d05e620a4a24bba8595557cd41405 /sway
parentMerge pull request #876 from zandrmartin/patch-1 (diff)
downloadsway-416417a54c5875abcdc257b6ad10ff086c35eefc.tar.gz
sway-416417a54c5875abcdc257b6ad10ff086c35eefc.tar.zst
sway-416417a54c5875abcdc257b6ad10ff086c35eefc.zip
Reorganize includes
Diffstat (limited to 'sway')
-rw-r--r--sway/border.c6
-rw-r--r--sway/commands.c30
-rw-r--r--sway/config.c14
-rw-r--r--sway/container.c20
-rw-r--r--sway/criteria.c6
-rw-r--r--sway/debug_log.c2
-rw-r--r--sway/extensions.c8
-rw-r--r--sway/focus.c15
-rw-r--r--sway/handlers.c35
-rw-r--r--sway/input.c4
-rw-r--r--sway/input_state.c5
-rw-r--r--sway/ipc-json.c4
-rw-r--r--sway/ipc-server.c12
-rw-r--r--sway/layout.c20
-rw-r--r--sway/main.c18
-rw-r--r--sway/output.c2
-rw-r--r--sway/resize.c10
-rw-r--r--sway/workspace.c20
18 files changed, 114 insertions, 117 deletions
diff --git a/sway/border.c b/sway/border.c
index 5cb02274..65f69411 100644
--- a/sway/border.c
+++ b/sway/border.c
@@ -1,12 +1,12 @@
1#include "border.h"
2#include <wlc/wlc-render.h> 1#include <wlc/wlc-render.h>
3#include <cairo/cairo.h> 2#include <cairo/cairo.h>
4#include <pango/pangocairo.h> 3#include <pango/pangocairo.h>
5#include <stdlib.h> 4#include <stdlib.h>
6#include <stdio.h> 5#include <stdio.h>
7#include <arpa/inet.h> 6#include <arpa/inet.h>
8#include "container.h" 7#include "sway/border.h"
9#include "config.h" 8#include "sway/container.h"
9#include "sway/config.h"
10#include "client/pango.h" 10#include "client/pango.h"
11 11
12void cairo_set_source_u32(cairo_t *cairo, uint32_t color) { 12void cairo_set_source_u32(cairo_t *cairo, uint32_t color) {
diff --git a/sway/commands.c b/sway/commands.c
index 5a5bcd22..347b463b 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -16,24 +16,24 @@
16#include <limits.h> 16#include <limits.h>
17#include <float.h> 17#include <float.h>
18#include <libinput.h> 18#include <libinput.h>
19#include "sway/layout.h"
20#include "sway/focus.h"
21#include "sway/workspace.h"
22#include "sway/commands.h"
23#include "sway/container.h"
24#include "sway/output.h"
25#include "sway/handlers.h"
26#include "sway/resize.h"
27#include "sway/input_state.h"
28#include "sway/criteria.h"
29#include "sway/ipc-server.h"
30#include "sway/input.h"
31#include "sway/border.h"
19#include "stringop.h" 32#include "stringop.h"
20#include "layout.h"
21#include "focus.h"
22#include "log.h"
23#include "util.h"
24#include "workspace.h"
25#include "commands.h"
26#include "container.h"
27#include "output.h"
28#include "handlers.h"
29#include "sway.h" 33#include "sway.h"
30#include "resize.h" 34#include "util.h"
31#include "input_state.h"
32#include "criteria.h"
33#include "ipc-server.h"
34#include "list.h" 35#include "list.h"
35#include "input.h" 36#include "log.h"
36#include "border.h"
37 37
38typedef struct cmd_results *sway_cmd(int argc, char **argv); 38typedef struct cmd_results *sway_cmd(int argc, char **argv);
39 39
diff --git a/sway/config.c b/sway/config.c
index bed233bd..a187fe3e 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -12,17 +12,17 @@
12#include <limits.h> 12#include <limits.h>
13#include <float.h> 13#include <float.h>
14#include "wayland-desktop-shell-server-protocol.h" 14#include "wayland-desktop-shell-server-protocol.h"
15#include "sway/commands.h"
16#include "sway/config.h"
17#include "sway/layout.h"
18#include "sway/input_state.h"
19#include "sway/criteria.h"
20#include "sway/input.h"
21#include "sway/border.h"
15#include "readline.h" 22#include "readline.h"
16#include "stringop.h" 23#include "stringop.h"
17#include "list.h" 24#include "list.h"
18#include "log.h" 25#include "log.h"
19#include "commands.h"
20#include "config.h"
21#include "layout.h"
22#include "input_state.h"
23#include "criteria.h"
24#include "input.h"
25#include "border.h"
26 26
27struct sway_config *config = NULL; 27struct sway_config *config = NULL;
28 28
diff --git a/sway/container.c b/sway/container.c
index c922bac3..5614293c 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -3,17 +3,17 @@
3#include <stdbool.h> 3#include <stdbool.h>
4#include <strings.h> 4#include <strings.h>
5#include <string.h> 5#include <string.h>
6#include "config.h" 6#include "sway/config.h"
7#include "stringop.h" 7#include "sway/container.h"
8#include "container.h" 8#include "sway/workspace.h"
9#include "workspace.h" 9#include "sway/focus.h"
10#include "focus.h" 10#include "sway/border.h"
11#include "border.h" 11#include "sway/layout.h"
12#include "layout.h" 12#include "sway/input_state.h"
13#include "input_state.h" 13#include "sway/ipc-server.h"
14#include "sway/output.h"
14#include "log.h" 15#include "log.h"
15#include "ipc-server.h" 16#include "stringop.h"
16#include "output.h"
17 17
18#define ASSERT_NONNULL(PTR) \ 18#define ASSERT_NONNULL(PTR) \
19 sway_assert (PTR, #PTR "must be non-null") 19 sway_assert (PTR, #PTR "must be non-null")
diff --git a/sway/criteria.c b/sway/criteria.c
index 53435d29..739a183e 100644
--- a/sway/criteria.c
+++ b/sway/criteria.c
@@ -2,12 +2,12 @@
2#include <stdio.h> 2#include <stdio.h>
3#include <stdbool.h> 3#include <stdbool.h>
4#include <regex.h> 4#include <regex.h>
5#include "criteria.h" 5#include "sway/criteria.h"
6#include "sway/container.h"
7#include "sway/config.h"
6#include "stringop.h" 8#include "stringop.h"
7#include "list.h" 9#include "list.h"
8#include "log.h" 10#include "log.h"
9#include "container.h"
10#include "config.h"
11 11
12enum criteria_type { // *must* keep in sync with criteria_strings[] 12enum criteria_type { // *must* keep in sync with criteria_strings[]
13 CRIT_CLASS, 13 CRIT_CLASS,
diff --git a/sway/debug_log.c b/sway/debug_log.c
index 7c988464..8d891a44 100644
--- a/sway/debug_log.c
+++ b/sway/debug_log.c
@@ -10,7 +10,7 @@
10#include <errno.h> 10#include <errno.h>
11#include <string.h> 11#include <string.h>
12#include <stringop.h> 12#include <stringop.h>
13#include "workspace.h" 13#include "sway/workspace.h"
14 14
15/* XXX:DEBUG:XXX */ 15/* XXX:DEBUG:XXX */
16static void container_log(const swayc_t *c, int depth) { 16static void container_log(const swayc_t *c, int depth) {
diff --git a/sway/extensions.c b/sway/extensions.c
index 4611f33e..70ec537d 100644
--- a/sway/extensions.c
+++ b/sway/extensions.c
@@ -4,11 +4,11 @@
4#include <wlc/wlc-render.h> 4#include <wlc/wlc-render.h>
5#include "wayland-desktop-shell-server-protocol.h" 5#include "wayland-desktop-shell-server-protocol.h"
6#include "wayland-swaylock-server-protocol.h" 6#include "wayland-swaylock-server-protocol.h"
7#include "layout.h" 7#include "sway/layout.h"
8#include "sway/input_state.h"
9#include "sway/extensions.h"
10#include "sway/ipc-server.h"
8#include "log.h" 11#include "log.h"
9#include "input_state.h"
10#include "extensions.h"
11#include "ipc-server.h"
12 12
13struct desktop_shell_state desktop_shell; 13struct desktop_shell_state desktop_shell;
14 14
diff --git a/sway/focus.c b/sway/focus.c
index 145e5584..9207260d 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -1,13 +1,12 @@
1#include <wlc/wlc.h> 1#include <wlc/wlc.h>
2 2#include "sway/focus.h"
3#include "focus.h" 3#include "sway/workspace.h"
4#include "sway/layout.h"
5#include "sway/config.h"
6#include "sway/input_state.h"
7#include "sway/ipc-server.h"
8#include "sway/border.h"
4#include "log.h" 9#include "log.h"
5#include "workspace.h"
6#include "layout.h"
7#include "config.h"
8#include "input_state.h"
9#include "ipc-server.h"
10#include "border.h"
11 10
12bool locked_container_focus = false; 11bool locked_container_focus = false;
13bool suspend_workspace_cleanup = false; 12bool suspend_workspace_cleanup = false;
diff --git a/sway/handlers.c b/sway/handlers.c
index 846d0005..47af7bd5 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -7,25 +7,24 @@
7#include <wlc/wlc-render.h> 7#include <wlc/wlc-render.h>
8#include <wlc/wlc-wayland.h> 8#include <wlc/wlc-wayland.h>
9#include <ctype.h> 9#include <ctype.h>
10 10#include "sway/handlers.h"
11#include "handlers.h" 11#include "sway/border.h"
12#include "border.h" 12#include "sway/layout.h"
13#include "log.h" 13#include "sway/config.h"
14#include "layout.h" 14#include "sway/commands.h"
15#include "config.h" 15#include "sway/workspace.h"
16#include "commands.h" 16#include "sway/container.h"
17#include "stringop.h" 17#include "sway/output.h"
18#include "workspace.h" 18#include "sway/focus.h"
19#include "container.h" 19#include "sway/input_state.h"
20#include "output.h" 20#include "sway/resize.h"
21#include "focus.h" 21#include "sway/extensions.h"
22#include "input_state.h" 22#include "sway/criteria.h"
23#include "resize.h" 23#include "sway/ipc-server.h"
24#include "extensions.h" 24#include "sway/input.h"
25#include "criteria.h"
26#include "ipc-server.h"
27#include "list.h" 25#include "list.h"
28#include "input.h" 26#include "stringop.h"
27#include "log.h"
29 28
30// Event should be sent to client 29// Event should be sent to client
31#define EVENT_PASSTHROUGH false 30#define EVENT_PASSTHROUGH false
diff --git a/sway/input.c b/sway/input.c
index 1f3e99e7..ae24cb49 100644
--- a/sway/input.c
+++ b/sway/input.c
@@ -4,8 +4,8 @@
4#include <stdio.h> 4#include <stdio.h>
5#include <string.h> 5#include <string.h>
6#include <libinput.h> 6#include <libinput.h>
7#include "config.h" 7#include "sway/config.h"
8#include "input.h" 8#include "sway/input.h"
9#include "list.h" 9#include "list.h"
10#include "log.h" 10#include "log.h"
11 11
diff --git a/sway/input_state.c b/sway/input_state.c
index 7e31d3d9..68df17de 100644
--- a/sway/input_state.c
+++ b/sway/input_state.c
@@ -1,10 +1,9 @@
1#include <string.h> 1#include <string.h>
2#include <stdbool.h> 2#include <stdbool.h>
3#include <ctype.h> 3#include <ctype.h>
4#include "sway/input_state.h"
5#include "sway/config.h"
4#include "log.h" 6#include "log.h"
5#include "config.h"
6
7#include "input_state.h"
8 7
9#define KEY_STATE_MAX_LENGTH 64 8#define KEY_STATE_MAX_LENGTH 64
10 9
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index 1debca7b..3f03b9f1 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -2,9 +2,9 @@
2#include <ctype.h> 2#include <ctype.h>
3#include <string.h> 3#include <string.h>
4#include <stdint.h> 4#include <stdint.h>
5#include "container.h" 5#include "sway/container.h"
6#include "sway/ipc-json.h"
6#include "util.h" 7#include "util.h"
7#include "ipc-json.h"
8 8
9static json_object *ipc_json_create_rect(swayc_t *c) { 9static json_object *ipc_json_create_rect(swayc_t *c) {
10 json_object *rect = json_object_new_object(); 10 json_object *rect = json_object_new_object();
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index 7039e348..70007f57 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -13,15 +13,15 @@
13#include <json-c/json.h> 13#include <json-c/json.h>
14#include <list.h> 14#include <list.h>
15#include <libinput.h> 15#include <libinput.h>
16#include "ipc-json.h" 16#include "sway/ipc-json.h"
17#include "ipc-server.h" 17#include "sway/ipc-server.h"
18#include "sway/config.h"
19#include "sway/commands.h"
20#include "sway/input.h"
21#include "stringop.h"
18#include "log.h" 22#include "log.h"
19#include "config.h"
20#include "commands.h"
21#include "list.h" 23#include "list.h"
22#include "stringop.h"
23#include "util.h" 24#include "util.h"
24#include "input.h"
25 25
26static int ipc_socket = -1; 26static int ipc_socket = -1;
27static struct wlc_event_source *ipc_event_source = NULL; 27static struct wlc_event_source *ipc_event_source = NULL;
diff --git a/sway/layout.c b/sway/layout.c
index 01c8e4e3..cf6a111e 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -2,17 +2,17 @@
2#include <stdbool.h> 2#include <stdbool.h>
3#include <math.h> 3#include <math.h>
4#include <wlc/wlc.h> 4#include <wlc/wlc.h>
5#include "extensions.h" 5#include "sway/extensions.h"
6#include "log.h" 6#include "sway/config.h"
7#include "sway/container.h"
8#include "sway/workspace.h"
9#include "sway/focus.h"
10#include "sway/output.h"
11#include "sway/ipc-server.h"
12#include "sway/border.h"
13#include "sway/layout.h"
7#include "list.h" 14#include "list.h"
8#include "config.h" 15#include "log.h"
9#include "container.h"
10#include "workspace.h"
11#include "focus.h"
12#include "output.h"
13#include "ipc-server.h"
14#include "border.h"
15#include "layout.h"
16 16
17swayc_t root_container; 17swayc_t root_container;
18list_t *scratchpad; 18list_t *scratchpad;
diff --git a/sway/main.c b/sway/main.c
index 51b12d20..972b260b 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -8,17 +8,17 @@
8#include <signal.h> 8#include <signal.h>
9#include <unistd.h> 9#include <unistd.h>
10#include <getopt.h> 10#include <getopt.h>
11#include "extensions.h" 11#include "sway/extensions.h"
12#include "layout.h" 12#include "sway/layout.h"
13#include "stringop.h" 13#include "sway/config.h"
14#include "config.h" 14#include "sway/handlers.h"
15#include "log.h" 15#include "sway/input.h"
16#include "readline.h" 16#include "sway/ipc-server.h"
17#include "handlers.h"
18#include "ipc-client.h" 17#include "ipc-client.h"
19#include "ipc-server.h" 18#include "readline.h"
20#include "input.h" 19#include "stringop.h"
21#include "sway.h" 20#include "sway.h"
21#include "log.h"
22 22
23static bool terminate_request = false; 23static bool terminate_request = false;
24static int exit_value = 0; 24static int exit_value = 0;
diff --git a/sway/output.c b/sway/output.c
index 97b8a4a6..b337b143 100644
--- a/sway/output.c
+++ b/sway/output.c
@@ -1,7 +1,7 @@
1#include <strings.h> 1#include <strings.h>
2#include <ctype.h> 2#include <ctype.h>
3#include <stdlib.h> 3#include <stdlib.h>
4#include "output.h" 4#include "sway/output.h"
5#include "log.h" 5#include "log.h"
6#include "list.h" 6#include "list.h"
7 7
diff --git a/sway/resize.c b/sway/resize.c
index 18bb86bb..b32d2431 100644
--- a/sway/resize.c
+++ b/sway/resize.c
@@ -1,11 +1,11 @@
1#include <wlc/wlc.h> 1#include <wlc/wlc.h>
2#include <math.h> 2#include <math.h>
3#include "layout.h" 3#include "sway/layout.h"
4#include "focus.h" 4#include "sway/focus.h"
5#include "sway/input_state.h"
6#include "sway/handlers.h"
7#include "sway/resize.h"
5#include "log.h" 8#include "log.h"
6#include "input_state.h"
7#include "handlers.h"
8#include "resize.h"
9 9
10static bool set_size_floating(int new_dimension, bool use_width) { 10static bool set_size_floating(int new_dimension, bool use_width) {
11 swayc_t *view = get_focused_float(swayc_active_workspace()); 11 swayc_t *view = get_focused_float(swayc_active_workspace());
diff --git a/sway/workspace.c b/sway/workspace.c
index 9c3e69a9..7b24d7d9 100644
--- a/sway/workspace.c
+++ b/sway/workspace.c
@@ -6,18 +6,18 @@
6#include <string.h> 6#include <string.h>
7#include <strings.h> 7#include <strings.h>
8#include <sys/types.h> 8#include <sys/types.h>
9#include "ipc-server.h" 9#include "sway/ipc-server.h"
10#include "extensions.h" 10#include "sway/extensions.h"
11#include "workspace.h" 11#include "sway/workspace.h"
12#include "layout.h" 12#include "sway/layout.h"
13#include "list.h" 13#include "sway/container.h"
14#include "log.h" 14#include "sway/handlers.h"
15#include "container.h" 15#include "sway/config.h"
16#include "handlers.h" 16#include "sway/focus.h"
17#include "config.h"
18#include "stringop.h" 17#include "stringop.h"
19#include "focus.h"
20#include "util.h" 18#include "util.h"
19#include "list.h"
20#include "log.h"
21#include "ipc.h" 21#include "ipc.h"
22 22
23char *prev_workspace_name = NULL; 23char *prev_workspace_name = NULL;