aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-06 08:28:46 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-06 08:28:46 -0500
commit338a0399f8d7c0ebe9cbb989945d8fd646d8d407 (patch)
tree27c33336ef4ac608b28378e55b6a7fdeb225aa27
parentMerge pull request #1498 from emersion/config (diff)
downloadsway-338a0399f8d7c0ebe9cbb989945d8fd646d8d407.tar.gz
sway-338a0399f8d7c0ebe9cbb989945d8fd646d8d407.tar.zst
sway-338a0399f8d7c0ebe9cbb989945d8fd646d8d407.zip
input skeleton
-rw-r--r--include/sway/input.h18
-rw-r--r--meson.build1
-rw-r--r--sway/meson.build2
-rw-r--r--sway/server.c4
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
8struct sway_input {
9 list_t *input_devices;
10};
11
12struct input_config *new_input_config(const char* identifier);
13
14char* libinput_dev_unique_id(struct libinput_device *dev);
15
16struct 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')
29pango = dependency('pango') 29pango = dependency('pango')
30pixman = dependency('pixman-1') 30pixman = dependency('pixman-1')
31libcap = dependency('libcap') 31libcap = dependency('libcap')
32libinput = dependency('libinput')
32math = cc.find_library('m') 33math = cc.find_library('m')
33git = find_program('git', required: false) 34git = find_program('git', required: false)
34a2x = find_program('a2x', required: false) 35a2x = 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
30executable( 32executable(
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
16bool server_init(struct sway_server *server) { 17bool 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