aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerzi Kaminsky <JerziKaminsky@users.noreply.github.com>2017-04-12 20:13:22 +0300
committerJerzi Kaminsky <JerziKaminsky@users.noreply.github.com>2017-04-14 02:30:41 +0300
commitb463fb8adc18f128d5af46096d002f7f6d6c9dfe (patch)
tree53d2262f49119509b2638a4dea90f672cffb60b3
parentb3541d9dc5e3037889026d3d918b174d9ecc9567 (diff)
downloadsway-b463fb8adc18f128d5af46096d002f7f6d6c9dfe.zip
sway-b463fb8adc18f128d5af46096d002f7f6d6c9dfe.tar.gz
sway-b463fb8adc18f128d5af46096d002f7f6d6c9dfe.tar.bz2
Remain compat with libinput < 1.7.0
-rw-r--r--README.md1
-rw-r--r--sway/ipc-json.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/README.md b/README.md
index 616da66..dc39bf9 100644
--- a/README.md
+++ b/README.md
@@ -44,6 +44,7 @@ Install dependencies:
* [wlc](https://github.com/Cloudef/wlc)
* wayland
* xwayland
+* libinput >= 1.6.0
* libcap
* asciidoc
* pcre
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index fba489d..4c4484e 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -284,7 +284,9 @@ json_object *ipc_json_describe_input(struct libinput_device *device) {
{ LIBINPUT_DEVICE_CAP_TABLET_TOOL, "tablet_tool", NULL },
{ LIBINPUT_DEVICE_CAP_TABLET_PAD, "tablet_pad", NULL },
{ LIBINPUT_DEVICE_CAP_GESTURE, "gesture", NULL },
- { LIBINPUT_DEVICE_CAP_SWITCH, "switch", NULL }
+#ifdef LIBINPUT_DEVICE_CAP_SWITCH // libinput 1.7.0+
+ { LIBINPUT_DEVICE_CAP_SWITCH, "switch", NULL },
+#endif
};
json_object *_caps = json_object_new_array();