summaryrefslogtreecommitdiff
path: root/user/sway
diff options
context:
space:
mode:
Diffstat (limited to 'user/sway')
-rw-r--r--user/sway/APKBUILD9
-rw-r--r--user/sway/libinput-new-api.patch46
2 files changed, 52 insertions, 3 deletions
diff --git a/user/sway/APKBUILD b/user/sway/APKBUILD
index 16a8b3992..6831a1044 100644
--- a/user/sway/APKBUILD
+++ b/user/sway/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=sway
pkgver=1.10
-pkgrel=0
+pkgrel=1
pkgdesc="tiling Wayland compositor like i3"
url="https://swaywm.org"
arch="all"
@@ -12,7 +12,9 @@ makedepends="cairo-dev gdk-pixbuf-dev json-c-dev meson libevdev-dev
libinput-dev>=1.26.0 libxkbcommon>=1.5.0 pango-dev pcre2-dev scdoc
wayland-protocols wlroots-0.18-dev"
subpackages="$pkgname-doc"
-source="https://github.com/swaywm/sway/releases/download/$pkgver/sway-$pkgver.tar.gz"
+source="https://github.com/swaywm/sway/releases/download/$pkgver/sway-$pkgver.tar.gz
+ libinput-new-api.patch
+ "
build() {
meson setup \
@@ -34,4 +36,5 @@ package() {
DESTDIR="$pkgdir" meson install -C output
}
-sha512sums="f75a80506d2dcae722ea64c47fa423b9713bcfaa6541ffc353abd413238abb9ab7c88490d54e30ef09dc003215aa6a0005e5b425c9c943f982d5ff3c7cfad440 sway-1.10.tar.gz"
+sha512sums="f75a80506d2dcae722ea64c47fa423b9713bcfaa6541ffc353abd413238abb9ab7c88490d54e30ef09dc003215aa6a0005e5b425c9c943f982d5ff3c7cfad440 sway-1.10.tar.gz
+7fe9e2c293de5b158e9397ca0cc5192e2fe8f14b3f978927bdfe3c65c88ee67c3dd100d6ed066ca260ebc103ba76fed24a325821e67d7d6bc8c4273a4e42b116 libinput-new-api.patch"
diff --git a/user/sway/libinput-new-api.patch b/user/sway/libinput-new-api.patch
new file mode 100644
index 000000000..6938f9b3a
--- /dev/null
+++ b/user/sway/libinput-new-api.patch
@@ -0,0 +1,46 @@
+From e2409aa49611bee1e1b99033461bfab0a7550c48 Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact@emersion.fr>
+Date: Wed, 20 Nov 2024 20:41:16 +0100
+Subject: [PATCH] ipc-json: handle LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKY
+
+New entry introduced in libinput 1.27.0.
+---
+ meson.build | 8 +++-----
+ sway/ipc-json.c | 5 +++++
+ 2 files changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 71e75fd9bc..9ce5723e78 100644
+--- a/meson.build
++++ b/meson.build
+@@ -109,11 +109,9 @@ conf_data.set10('HAVE_LIBSYSTEMD', sdbus.found() and sdbus.name() == 'libsystemd
+ conf_data.set10('HAVE_LIBELOGIND', sdbus.found() and sdbus.name() == 'libelogind')
+ conf_data.set10('HAVE_BASU', sdbus.found() and sdbus.name() == 'basu')
+ conf_data.set10('HAVE_TRAY', have_tray)
+-conf_data.set10('HAVE_LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM', cc.has_header_symbol(
+- 'libinput.h',
+- 'LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM',
+- dependencies: libinput,
+-))
++foreach sym : ['LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM', 'LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKY']
++ conf_data.set10('HAVE_' + sym, cc.has_header_symbol('libinput.h', sym, dependencies: libinput))
++endforeach
+
+ scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: get_option('man-pages'))
+ if scdoc.found()
+diff --git a/sway/ipc-json.c b/sway/ipc-json.c
+index 571338a4f1..fc1df2ac64 100644
+--- a/sway/ipc-json.c
++++ b/sway/ipc-json.c
+@@ -931,6 +931,11 @@ static json_object *describe_libinput_device(struct libinput_device *device) {
+ case LIBINPUT_CONFIG_DRAG_LOCK_DISABLED:
+ drag_lock = "disabled";
+ break;
++#if HAVE_LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKY
++ case LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKY:
++ drag_lock = "enabled_sticky";
++ break;
++#endif
+ }
+ json_object_object_add(object, "tap_drag_lock",
+ json_object_new_string(drag_lock));