diff --git a/actions.cc b/actions.cc index 45c03761..54383f3c 100644 --- a/actions.cc +++ b/actions.cc @@ -23,6 +23,7 @@ #include "grabber.h" #include "cellrenderertextish.h" +#include #include bool TreeViewMulti::on_button_press_event(GdkEventButton* event) { @@ -54,7 +55,7 @@ void TreeViewMulti::on_drag_begin(const Glib::RefPtr &context) 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](const Glib::RefPtr&, const Gtk::TreePath&, const bool&) { return !this->pending; }); } enum Type { COMMAND, KEY, TEXT, SCROLL, IGNORE, BUTTON, MISC }; diff --git a/handler.cc b/handler.cc index 8830ea28..22f47e9c 100644 --- a/handler.cc +++ b/handler.cc @@ -533,7 +533,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;