summarylogtreecommitdiffstats
path: root/multiplier.patch
diff options
context:
space:
mode:
authorbilabila2019-04-17 14:44:26 +0800
committerbilabila2019-04-17 14:44:26 +0800
commitfcd0177ca476a3be451a917a7f4852ac993e8279 (patch)
treeda6f9332a97396c2b7cf741481f86b557cceebbc /multiplier.patch
parentcc2bbce0f29f973038d2a8dcac1f7729bd0922ba (diff)
downloadaur-libinput-multiplier.tar.gz
Diffstat (limited to 'multiplier.patch')
-rw-r--r--multiplier.patch6
1 files changed, 4 insertions, 2 deletions
diff --git a/multiplier.patch b/multiplier.patch
index 83fb9dd325c..8f4b315f0f2 100644
--- a/multiplier.patch
+++ b/multiplier.patch
@@ -14,16 +14,17 @@ diff --git a/src/libinput.c b/src/libinput.c
index 01f53974..2ee9e1dc 100644
--- a/src/libinput.c
+++ b/src/libinput.c
-@@ -33,6 +33,8 @@
+@@ -33,6 +33,9 @@
#include <sys/epoll.h>
#include <unistd.h>
#include <assert.h>
+#include <fcntl.h>
+#include <sys/mman.h>
++#include <sys/stat.h>
#include "libinput.h"
#include "libinput-private.h"
-@@ -720,6 +722,15 @@ libinput_event_pointer_get_axis_value(struct libinput_event_pointer *event,
+@@ -720,6 +722,16 @@ libinput_event_pointer_get_axis_value(struct libinput_event_pointer *event,
return value;
}
@@ -32,6 +33,7 @@ index 01f53974..2ee9e1dc 100644
+ int fd;
+ char *file = "/tmp/libinput_discrete_deltay_multiplier";
+ if ((fd = open(file, O_RDWR | O_CREAT, 0666)) == -1) return;
++ fchmod(fd,S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+ if (write(fd, "1", sizeof(char)) == -1) return;
+ multiplier = mmap(NULL, 1024, PROT_READ, MAP_SHARED, fd, 0);
+}