From 22b28d25bb696e37e73b4bc641439b3db9f564ed Mon Sep 17 00:00:00 2001 From: nagae-memooff <169192@gmail.com> Date: Sun, 2 Oct 2016 02:12:09 +0800 Subject: [PATCH 1/3] fix build failed in libsignc++ version 2.5.1 or newer --- actions.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/actions.cc b/actions.cc index 45c03761..9676ee9f 100644 --- a/actions.cc +++ b/actions.cc @@ -51,10 +51,11 @@ void TreeViewMulti::on_drag_begin(const Glib::RefPtr &context) 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 const&, Gtk::TreeModel::Path const&, bool) { + return !pending; + }); } enum Type { COMMAND, KEY, TEXT, SCROLL, IGNORE, BUTTON, MISC }; From 5f6885c59d1366e28317c9553c2e406fbd6569f9 Mon Sep 17 00:00:00 2001 From: p2rkw Date: Wed, 1 Feb 2017 23:01:16 +0100 Subject: [PATCH 2/3] Remove requirement for current device to be in absolute mode, this will allow mtrack to be used with easystroke --- handler.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handler.cc b/handler.cc index 8830ea28..fb3a1fad 100644 --- a/handler.cc +++ b/handler.cc @@ -563,7 +563,7 @@ class AbstractScrollHandler : public Handler { } protected: void move_back() { - if (!prefs.move_back.get() || (xstate->current_dev && xstate->current_dev->absolute)) + if (!prefs.move_back.get()) return; XTestFakeMotionEvent(dpy, DefaultScreen(dpy), orig_x, orig_y, 0); } @@ -968,7 +968,7 @@ class StrokeHandler : public Handler, public sigc::trackable { virtual void release(guint b, RTriple e) { RStroke s = finish(0); - if (prefs.move_back.get() && !xstate->current_dev->absolute) + if (prefs.move_back.get()) XTestFakeMotionEvent(dpy, DefaultScreen(dpy), orig->x, orig->y, 0); else XTestFakeMotionEvent(dpy, DefaultScreen(dpy), e->x, e->y, 0); From c328ef36d7d85e899fa1ccbc9f11aa1b2317f7bc Mon Sep 17 00:00:00 2001 From: p2rkw Date: Wed, 1 Feb 2017 23:01:27 +0100 Subject: [PATCH 3/3] Increase required scores --- gesture.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gesture.cc b/gesture.cc index 8531c084..0df990ee 100644 --- a/gesture.cc +++ b/gesture.cc @@ -104,9 +104,9 @@ int Stroke::compare(RStroke a, RStroke b, double &score) { return -1; score = MAX(1.0 - 2.5*cost, 0.0); if (a->timeout) - return score > 0.85; + return score > 0.95; else - return score > 0.7; + return score > 0.92; } Glib::RefPtr Stroke::draw(int size, double width, bool inv) const {