summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-07 07:31:49 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-07 07:35:10 -0500
commit21ce20885a6a6e9e7178778513b09fea9354c603 (patch)
treeb7d763380f5b4df177ae0b8e0ca455e163bdad19
parentinput skeleton (diff)
downloadsway-21ce20885a6a6e9e7178778513b09fea9354c603.tar.gz
sway-21ce20885a6a6e9e7178778513b09fea9354c603.tar.zst
sway-21ce20885a6a6e9e7178778513b09fea9354c603.zip
rename input to input-manager
-rw-r--r--include/sway/input-manager.h (renamed from include/sway/input.h)5
-rw-r--r--include/sway/server.h2
-rw-r--r--sway/input/input-manager.c (renamed from sway/input/input.c)8
-rw-r--r--sway/meson.build2
-rw-r--r--sway/server.c4
5 files changed, 12 insertions, 9 deletions
diff --git a/include/sway/input.h b/include/sway/input-manager.h
index 21ed61c5..a3662f7b 100644
--- a/include/sway/input.h
+++ b/include/sway/input-manager.h
@@ -5,7 +5,7 @@
5#include "config.h" 5#include "config.h"
6#include "list.h" 6#include "list.h"
7 7
8struct sway_input { 8struct sway_input_manager {
9 list_t *input_devices; 9 list_t *input_devices;
10}; 10};
11 11
@@ -13,6 +13,7 @@ struct input_config *new_input_config(const char* identifier);
13 13
14char* libinput_dev_unique_id(struct libinput_device *dev); 14char* libinput_dev_unique_id(struct libinput_device *dev);
15 15
16struct sway_input *sway_input_create(struct sway_server *server); 16struct sway_input_manager *sway_input_manager_create(
17 struct sway_server *server);
17 18
18#endif 19#endif
diff --git a/include/sway/server.h b/include/sway/server.h
index 3fa72e84..76a05476 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -22,7 +22,7 @@ struct sway_server {
22 struct wlr_compositor *compositor; 22 struct wlr_compositor *compositor;
23 struct wlr_data_device_manager *data_device_manager; 23 struct wlr_data_device_manager *data_device_manager;
24 24
25 struct sway_input *input; 25 struct sway_input_manager *input;
26 26
27 struct wl_listener output_add; 27 struct wl_listener output_add;
28 struct wl_listener output_remove; 28 struct wl_listener output_remove;
diff --git a/sway/input/input.c b/sway/input/input-manager.c
index 02b4995e..285a68b8 100644
--- a/sway/input/input.c
+++ b/sway/input/input-manager.c
@@ -6,15 +6,17 @@
6#include <string.h> 6#include <string.h>
7#include <libinput.h> 7#include <libinput.h>
8#include "sway/config.h" 8#include "sway/config.h"
9#include "sway/input.h" 9#include "sway/input-manager.h"
10#include "sway/server.h" 10#include "sway/server.h"
11#include "list.h" 11#include "list.h"
12#include "log.h" 12#include "log.h"
13 13
14struct input_config *current_input_config = NULL; 14struct input_config *current_input_config = NULL;
15 15
16struct sway_input *sway_input_create(struct sway_server *server) { 16struct sway_input_manager *sway_input_manager_create(
17 struct sway_input *input = calloc(1, sizeof(struct sway_input)); 17 struct sway_server *server) {
18 struct sway_input_manager *input =
19 calloc(1, sizeof(struct sway_input_manager));
18 if (!input) { 20 if (!input) {
19 return NULL; 21 return NULL;
20 } 22 }
diff --git a/sway/meson.build b/sway/meson.build
index 8631b9c3..b5cdbbf2 100644
--- a/sway/meson.build
+++ b/sway/meson.build
@@ -2,7 +2,7 @@ sway_sources = files(
2 'main.c', 2 'main.c',
3 'server.c', 3 'server.c',
4 'commands.c', 4 'commands.c',
5 'input/input.c', 5 'input/input-manager.c',
6 'commands/exit.c', 6 'commands/exit.c',
7 'commands/exec.c', 7 'commands/exec.c',
8 'commands/exec_always.c', 8 'commands/exec_always.c',
diff --git a/sway/server.c b/sway/server.c
index 3873e625..174beac6 100644
--- a/sway/server.c
+++ b/sway/server.c
@@ -11,7 +11,7 @@
11// TODO WLR: make Xwayland optional 11// TODO WLR: make Xwayland optional
12#include <wlr/xwayland.h> 12#include <wlr/xwayland.h>
13#include "sway/server.h" 13#include "sway/server.h"
14#include "sway/input.h" 14#include "sway/input-manager.h"
15#include "log.h" 15#include "log.h"
16 16
17bool server_init(struct sway_server *server) { 17bool server_init(struct sway_server *server) {
@@ -60,7 +60,7 @@ bool server_init(struct sway_server *server) {
60 return false; 60 return false;
61 } 61 }
62 62
63 server->input = sway_input_create(server); 63 server->input = sway_input_manager_create(server);
64 64
65 return true; 65 return true;
66} 66}