summaryrefslogtreecommitdiff
path: root/x11-misc/easystroke/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-03 16:17:22 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-03 16:17:22 +0000
commit4cd2370bed609c118b6edfde5d3f116e5c35b897 (patch)
treeec58f2c41f49754e41521d5ebc9dce4597ddd0a5 /x11-misc/easystroke/files
parentf443475c824b4b5c086e6d040961cb35ad81bc60 (diff)
gentoo resync : 03.12.2017
Diffstat (limited to 'x11-misc/easystroke/files')
-rw-r--r--x11-misc/easystroke/files/easystroke-0.6.0-abs.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/x11-misc/easystroke/files/easystroke-0.6.0-abs.patch b/x11-misc/easystroke/files/easystroke-0.6.0-abs.patch
new file mode 100644
index 000000000000..9b4ab63828db
--- /dev/null
+++ b/x11-misc/easystroke/files/easystroke-0.6.0-abs.patch
@@ -0,0 +1,45 @@
+--- a/handler.cc
++++ b/handler.cc
+@@ -533,7 +533,7 @@
+ virtual Grabber::State grab_mode() { return parent->grab_mode(); }
+ };
+
+-static inline float abs(float x) { return x > 0 ? x : -x; }
++static inline float easystroke_abs(float x) { return x > 0 ? x : -x; }
+
+ class AbstractScrollHandler : public Handler {
+ bool have_x, have_y;
+@@ -559,7 +559,7 @@
+ xstate->fake_click(b2);
+ }
+ static float curve(float v) {
+- return v * exp(log(abs(v))/3);
++ return v * exp(log(easystroke_abs(v))/3);
+ }
+ protected:
+ void move_back() {
+@@ -597,8 +597,8 @@
+ offset_x += factor * curve(dx/dt)*dt/20.0;
+ offset_y += factor * curve(dy/dt)*dt/10.0;
+ int b1 = 0, n1 = 0, b2 = 0, n2 = 0;
+- if (abs(offset_x) > 1.0) {
+- n1 = (int)floor(abs(offset_x));
++ if (easystroke_abs(offset_x) > 1.0) {
++ n1 = (int)floor(easystroke_abs(offset_x));
+ if (offset_x > 0) {
+ b1 = 7;
+ offset_x -= n1;
+@@ -607,10 +607,10 @@
+ offset_x += n1;
+ }
+ }
+- if (abs(offset_y) > 1.0) {
+- if (abs(offset_y) < 1.0)
++ if (easystroke_abs(offset_y) > 1.0) {
++ if (easystroke_abs(offset_y) < 1.0)
+ return;
+- n2 = (int)floor(abs(offset_y));
++ n2 = (int)floor(easystroke_abs(offset_y));
+ if (offset_y > 0) {
+ b2 = 5;
+ offset_y -= n2;