aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-09-01 08:18:37 -0400
committerDrew DeVault <sir@cmpwn.com>2016-09-01 08:18:37 -0400
commit416417a54c5875abcdc257b6ad10ff086c35eefc (patch)
tree00f20884a05d05e620a4a24bba8595557cd41405 /sway
parent729fdf7d9186ceba0f84b87edfd473642964227f (diff)
downloadsway-416417a54c5875abcdc257b6ad10ff086c35eefc.tar.xz
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 @@
-#include "border.h"
#include <wlc/wlc-render.h>
#include <cairo/cairo.h>
#include <pango/pangocairo.h>
#include <stdlib.h>
#include <stdio.h>
#include <arpa/inet.h>
-#include "container.h"
-#include "config.h"
+#include "sway/border.h"
+#include "sway/container.h"
+#include "sway/config.h"
#include "client/pango.h"
void 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 @@
#include <limits.h>
#include <float.h>
#include <libinput.h>
+#include "sway/layout.h"
+#include "sway/focus.h"
+#include "sway/workspace.h"
+#include "sway/commands.h"
+#include "sway/container.h"
+#include "sway/output.h"
+#include "sway/handlers.h"
+#include "sway/resize.h"
+#include "sway/input_state.h"
+#include "sway/criteria.h"
+#include "sway/ipc-server.h"
+#include "sway/input.h"
+#include "sway/border.h"
#include "stringop.h"
-#include "layout.h"
-#include "focus.h"
-#include "log.h"
-#include "util.h"
-#include "workspace.h"
-#include "commands.h"
-#include "container.h"
-#include "output.h"
-#include "handlers.h"
#include "sway.h"
-#include "resize.h"
-#include "input_state.h"
-#include "criteria.h"
-#include "ipc-server.h"
+#include "util.h"
#include "list.h"
-#include "input.h"
-#include "border.h"
+#include "log.h"
typedef struct cmd_results *sway_cmd(int argc, char **argv);
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 @@
#include <limits.h>
#include <float.h>
#include "wayland-desktop-shell-server-protocol.h"
+#include "sway/commands.h"
+#include "sway/config.h"
+#include "sway/layout.h"
+#include "sway/input_state.h"
+#include "sway/criteria.h"
+#include "sway/input.h"
+#include "sway/border.h"
#include "readline.h"
#include "stringop.h"
#include "list.h"
#include "log.h"
-#include "commands.h"
-#include "config.h"
-#include "layout.h"
-#include "input_state.h"
-#include "criteria.h"
-#include "input.h"
-#include "border.h"
struct sway_config *config = NULL;
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 @@
#include <stdbool.h>
#include <strings.h>
#include <string.h>
-#include "config.h"
-#include "stringop.h"
-#include "container.h"
-#include "workspace.h"
-#include "focus.h"
-#include "border.h"
-#include "layout.h"
-#include "input_state.h"
+#include "sway/config.h"
+#include "sway/container.h"
+#include "sway/workspace.h"
+#include "sway/focus.h"
+#include "sway/border.h"
+#include "sway/layout.h"
+#include "sway/input_state.h"
+#include "sway/ipc-server.h"
+#include "sway/output.h"
#include "log.h"
-#include "ipc-server.h"
-#include "output.h"
+#include "stringop.h"
#define ASSERT_NONNULL(PTR) \
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 @@
#include <stdio.h>
#include <stdbool.h>
#include <regex.h>
-#include "criteria.h"
+#include "sway/criteria.h"
+#include "sway/container.h"
+#include "sway/config.h"
#include "stringop.h"
#include "list.h"
#include "log.h"
-#include "container.h"
-#include "config.h"
enum criteria_type { // *must* keep in sync with criteria_strings[]
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 @@
#include <errno.h>
#include <string.h>
#include <stringop.h>
-#include "workspace.h"
+#include "sway/workspace.h"
/* XXX:DEBUG:XXX */
static 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 @@
#include <wlc/wlc-render.h>
#include "wayland-desktop-shell-server-protocol.h"
#include "wayland-swaylock-server-protocol.h"
-#include "layout.h"
+#include "sway/layout.h"
+#include "sway/input_state.h"
+#include "sway/extensions.h"
+#include "sway/ipc-server.h"
#include "log.h"
-#include "input_state.h"
-#include "extensions.h"
-#include "ipc-server.h"
struct desktop_shell_state desktop_shell;
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 @@
#include <wlc/wlc.h>
-
-#include "focus.h"
+#include "sway/focus.h"
+#include "sway/workspace.h"
+#include "sway/layout.h"
+#include "sway/config.h"
+#include "sway/input_state.h"
+#include "sway/ipc-server.h"
+#include "sway/border.h"
#include "log.h"
-#include "workspace.h"
-#include "layout.h"
-#include "config.h"
-#include "input_state.h"
-#include "ipc-server.h"
-#include "border.h"
bool locked_container_focus = false;
bool 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 @@
#include <wlc/wlc-render.h>
#include <wlc/wlc-wayland.h>
#include <ctype.h>
-
-#include "handlers.h"
-#include "border.h"
-#include "log.h"
-#include "layout.h"
-#include "config.h"
-#include "commands.h"
-#include "stringop.h"
-#include "workspace.h"
-#include "container.h"
-#include "output.h"
-#include "focus.h"
-#include "input_state.h"
-#include "resize.h"
-#include "extensions.h"
-#include "criteria.h"
-#include "ipc-server.h"
+#include "sway/handlers.h"
+#include "sway/border.h"
+#include "sway/layout.h"
+#include "sway/config.h"
+#include "sway/commands.h"
+#include "sway/workspace.h"
+#include "sway/container.h"
+#include "sway/output.h"
+#include "sway/focus.h"
+#include "sway/input_state.h"
+#include "sway/resize.h"
+#include "sway/extensions.h"
+#include "sway/criteria.h"
+#include "sway/ipc-server.h"
+#include "sway/input.h"
#include "list.h"
-#include "input.h"
+#include "stringop.h"
+#include "log.h"
// Event should be sent to client
#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 @@
#include <stdio.h>
#include <string.h>
#include <libinput.h>
-#include "config.h"
-#include "input.h"
+#include "sway/config.h"
+#include "sway/input.h"
#include "list.h"
#include "log.h"
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 @@
#include <string.h>
#include <stdbool.h>
#include <ctype.h>
+#include "sway/input_state.h"
+#include "sway/config.h"
#include "log.h"
-#include "config.h"
-
-#include "input_state.h"
#define KEY_STATE_MAX_LENGTH 64
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 @@
#include <ctype.h>
#include <string.h>
#include <stdint.h>
-#include "container.h"
+#include "sway/container.h"
+#include "sway/ipc-json.h"
#include "util.h"
-#include "ipc-json.h"
static json_object *ipc_json_create_rect(swayc_t *c) {
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 @@
#include <json-c/json.h>
#include <list.h>
#include <libinput.h>
-#include "ipc-json.h"
-#include "ipc-server.h"
+#include "sway/ipc-json.h"
+#include "sway/ipc-server.h"
+#include "sway/config.h"
+#include "sway/commands.h"
+#include "sway/input.h"
+#include "stringop.h"
#include "log.h"
-#include "config.h"
-#include "commands.h"
#include "list.h"
-#include "stringop.h"
#include "util.h"
-#include "input.h"
static int ipc_socket = -1;
static 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 @@
#include <stdbool.h>
#include <math.h>
#include <wlc/wlc.h>
-#include "extensions.h"
-#include "log.h"
+#include "sway/extensions.h"
+#include "sway/config.h"
+#include "sway/container.h"
+#include "sway/workspace.h"
+#include "sway/focus.h"
+#include "sway/output.h"
+#include "sway/ipc-server.h"
+#include "sway/border.h"
+#include "sway/layout.h"
#include "list.h"
-#include "config.h"
-#include "container.h"
-#include "workspace.h"
-#include "focus.h"
-#include "output.h"
-#include "ipc-server.h"
-#include "border.h"
-#include "layout.h"
+#include "log.h"
swayc_t root_container;
list_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 @@
#include <signal.h>
#include <unistd.h>
#include <getopt.h>
-#include "extensions.h"
-#include "layout.h"
-#include "stringop.h"
-#include "config.h"
-#include "log.h"
-#include "readline.h"
-#include "handlers.h"
+#include "sway/extensions.h"
+#include "sway/layout.h"
+#include "sway/config.h"
+#include "sway/handlers.h"
+#include "sway/input.h"
+#include "sway/ipc-server.h"
#include "ipc-client.h"
-#include "ipc-server.h"
-#include "input.h"
+#include "readline.h"
+#include "stringop.h"
#include "sway.h"
+#include "log.h"
static bool terminate_request = false;
static 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 @@
#include <strings.h>
#include <ctype.h>
#include <stdlib.h>
-#include "output.h"
+#include "sway/output.h"
#include "log.h"
#include "list.h"
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 @@
#include <wlc/wlc.h>
#include <math.h>
-#include "layout.h"
-#include "focus.h"
+#include "sway/layout.h"
+#include "sway/focus.h"
+#include "sway/input_state.h"
+#include "sway/handlers.h"
+#include "sway/resize.h"
#include "log.h"
-#include "input_state.h"
-#include "handlers.h"
-#include "resize.h"
static bool set_size_floating(int new_dimension, bool use_width) {
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 @@
#include <string.h>
#include <strings.h>
#include <sys/types.h>
-#include "ipc-server.h"
-#include "extensions.h"
-#include "workspace.h"
-#include "layout.h"
-#include "list.h"
-#include "log.h"
-#include "container.h"
-#include "handlers.h"
-#include "config.h"
+#include "sway/ipc-server.h"
+#include "sway/extensions.h"
+#include "sway/workspace.h"
+#include "sway/layout.h"
+#include "sway/container.h"
+#include "sway/handlers.h"
+#include "sway/config.h"
+#include "sway/focus.h"
#include "stringop.h"
-#include "focus.h"
#include "util.h"
+#include "list.h"
+#include "log.h"
#include "ipc.h"
char *prev_workspace_name = NULL;