easystroke works fine on Arch (I'm using it myself, from the repos). The version there is built from the original sourceforge page, and has two patches.
This first patch is for building with gcc7
From 9e2c32390c5c253aade3bb703e51841748d2c37e Mon Sep 17 00:00:00 2001
From: Jonathan Wakely <jwakely@redhat.com>
Date: Sat, 28 Jan 2017 01:26:00 +0000
Subject: [PATCH] Remove abs(float) function that clashes with std::abs(float)
Depending on which C++ standard library headers have been included there
might an abs(float) function already declared in the global namespace,
so the definition in this file conflicts with it. This cause a build
failure with GCC 7, which conforms more closely to the C++ standard with
respect to overloads of abs.
Including <cmath> and adding a using-declaration for std::abs ensures
that the standard std::abs(float) function is available. This solution
should be portable to all compilers.
---
handler.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/handler.cc b/handler.cc
index 8830ea2..685b1ff 100644
--- a/handler.cc
+++ b/handler.cc
@@ -23,6 +23,8 @@
#include <X11/extensions/XTest.h>
#include <X11/XKBlib.h>
#include <X11/Xproto.h>
+#include <cmath> // std::abs(float)
+using std::abs;
XState *xstate = nullptr;
@@ -533,8 +535,6 @@ class WaitForPongHandler : public Handler, protected Timeout {
virtual Grabber::State grab_mode() { return parent->grab_mode(); }
};
-static inline float abs(float x) { return x > 0 ? x : -x; }
-
class AbstractScrollHandler : public Handler {
bool have_x, have_y;
float last_x, last_y;
This second one is for the problem you've mentioned
diff -uprb easystroke-0.6.0.orig/actions.cc easystroke-0.6.0/actions.cc
--- easystroke-0.6.0.orig/actions.cc 2013-03-27 17:52:38.000000000 +0200
+++ easystroke-0.6.0/actions.cc 2015-12-07 22:07:17.720041171 +0200
@@ -51,10 +51,11 @@ void TreeViewMulti::on_drag_begin(const
context->set_icon(pb, pb->get_width(), pb->get_height());
}
-bool negate(bool b) { return !b; }
-
TreeViewMulti::TreeViewMulti() : Gtk::TreeView(), pending(false) {
- get_selection()->set_select_function(sigc::group(&negate, sigc::ref(pending)));
+ get_selection()->set_select_function(
+ [this](Glib::RefPtr<Gtk::TreeModel> const&, Gtk::TreeModel::Path const&, bool) {
+ return !pending;
+ });
}
enum Type { COMMAND, KEY, TEXT, SCROLL, IGNORE, BUTTON, MISC };
diff -uprb easystroke-0.6.0.orig/Makefile easystroke-0.6.0/Makefile
--- easystroke-0.6.0.orig/Makefile 2013-03-27 17:52:38.000000000 +0200
+++ easystroke-0.6.0/Makefile 2015-12-07 21:54:47.926776791 +0200
@@ -21,8 +21,7 @@ LOCALEDIR= $(PREFIX)/share/locale
DFLAGS =
OFLAGS = -O2
AOFLAGS = -O3
-STROKEFLAGS = -Wall -std=c99 $(DFLAGS)
-CXXFLAGS = -Wall $(DFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" `pkg-config gtkmm-3.0 dbus-glib-1 --cflags`
+CXXFLAGS = -Wall $(DFLAGS) -std=c++11 -DLOCALEDIR=\"$(LOCALEDIR)\" `pkg-config gtkmm-3.0 dbus-glib-1 --cflags`
CFLAGS = -Wall $(DFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" `pkg-config gtk+-3.0 --cflags` -DGETTEXT_PACKAGE='"easystroke"'
LDFLAGS = $(DFLAGS)
@@ -63,7 +62,7 @@ $(BINARY): $(OFILES)
$(CXX) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
stroke.o: stroke.c
- $(CC) $(STROKEFLAGS) $(AOFLAGS) -MT $@ -MMD -MP -MF $*.Po -o $@ -c $<
+ $(CC) $(CFLAGS) $(AOFLAGS) -MT $@ -MMD -MP -MF $*.Po -o $@ -c $<
%.o: %.c
$(CC) $(CFLAGS) $(OFLAGS) -MT $@ -MMD -MP -MF $*.Po -o $@ -c $<
The AUR package has 4 patches, you can check it out here. You can download the patches from there, and also click View PKGBUILD to see the build instructions (quite simple really, apply patches and then make). That one builds from git, but for a project like this which is basically dead, -git isn't much of a difference I think. There's only one commit in the last 2 years.
@nathanosman
? – heynnema Jul 07 '17 at 15:01@nath
it will give you a pop-up suggesting to auto complete it for you. Go to the AUGR that Muru linked above – You'reAGitForNotUsingGit Jul 07 '17 at 15:04patch
? – heynnema Jul 07 '17 at 15:39patch
sounds reasonable but I have never used C++. I don't know how to proceed. – ravery Jul 07 '17 at 15:49