diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-06 08:28:46 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-06 08:28:46 -0500 |
commit | 338a0399f8d7c0ebe9cbb989945d8fd646d8d407 (patch) | |
tree | 27c33336ef4ac608b28378e55b6a7fdeb225aa27 | |
parent | Merge pull request #1498 from emersion/config (diff) | |
download | sway-338a0399f8d7c0ebe9cbb989945d8fd646d8d407.tar.gz sway-338a0399f8d7c0ebe9cbb989945d8fd646d8d407.tar.zst sway-338a0399f8d7c0ebe9cbb989945d8fd646d8d407.zip |
input skeleton
-rw-r--r-- | include/sway/input.h | 18 | ||||
-rw-r--r-- | meson.build | 1 | ||||
-rw-r--r-- | sway/meson.build | 2 | ||||
-rw-r--r-- | sway/server.c | 4 |
4 files changed, 25 insertions, 0 deletions
diff --git a/include/sway/input.h b/include/sway/input.h new file mode 100644 index 00000000..21ed61c5 --- /dev/null +++ b/include/sway/input.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef _SWAY_INPUT_H | ||
2 | #define _SWAY_INPUT_H | ||
3 | #include <libinput.h> | ||
4 | #include "sway/server.h" | ||
5 | #include "config.h" | ||
6 | #include "list.h" | ||
7 | |||
8 | struct sway_input { | ||
9 | list_t *input_devices; | ||
10 | }; | ||
11 | |||
12 | struct input_config *new_input_config(const char* identifier); | ||
13 | |||
14 | char* libinput_dev_unique_id(struct libinput_device *dev); | ||
15 | |||
16 | struct sway_input *sway_input_create(struct sway_server *server); | ||
17 | |||
18 | #endif | ||
diff --git a/meson.build b/meson.build index 8e7b98ed..029aea46 100644 --- a/meson.build +++ b/meson.build | |||
@@ -29,6 +29,7 @@ xkbcommon = dependency('xkbcommon') | |||
29 | pango = dependency('pango') | 29 | pango = dependency('pango') |
30 | pixman = dependency('pixman-1') | 30 | pixman = dependency('pixman-1') |
31 | libcap = dependency('libcap') | 31 | libcap = dependency('libcap') |
32 | libinput = dependency('libinput') | ||
32 | math = cc.find_library('m') | 33 | math = cc.find_library('m') |
33 | git = find_program('git', required: false) | 34 | git = find_program('git', required: false) |
34 | a2x = find_program('a2x', required: false) | 35 | a2x = find_program('a2x', required: false) |
diff --git a/sway/meson.build b/sway/meson.build index 84f48137..8631b9c3 100644 --- a/sway/meson.build +++ b/sway/meson.build | |||
@@ -2,6 +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 | 'commands/exit.c', | 6 | 'commands/exit.c', |
6 | 'commands/exec.c', | 7 | 'commands/exec.c', |
7 | 'commands/exec_always.c', | 8 | 'commands/exec_always.c', |
@@ -25,6 +26,7 @@ sway_deps = [ | |||
25 | wlroots, | 26 | wlroots, |
26 | libcap, | 27 | libcap, |
27 | math, | 28 | math, |
29 | libinput, | ||
28 | ] | 30 | ] |
29 | 31 | ||
30 | executable( | 32 | executable( |
diff --git a/sway/server.c b/sway/server.c index 024d8429..3873e625 100644 --- a/sway/server.c +++ b/sway/server.c | |||
@@ -11,6 +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 "log.h" | 15 | #include "log.h" |
15 | 16 | ||
16 | bool server_init(struct sway_server *server) { | 17 | bool server_init(struct sway_server *server) { |
@@ -58,6 +59,9 @@ bool server_init(struct sway_server *server) { | |||
58 | wlr_backend_destroy(server->backend); | 59 | wlr_backend_destroy(server->backend); |
59 | return false; | 60 | return false; |
60 | } | 61 | } |
62 | |||
63 | server->input = sway_input_create(server); | ||
64 | |||
61 | return true; | 65 | return true; |
62 | } | 66 | } |
63 | 67 | ||