diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-12-06 00:43:58 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-12-06 00:43:58 +0100 |
commit | 52b75a02aeeaf2c23f5af32fededf4e5fb24bade (patch) | |
tree | 158d9a60763ce6a149ee12f78bc746a0dc8670fc /opentrack/work.hpp | |
parent | 0f577dbe8adb8f7e210241c6bee0be73349f8d45 (diff) |
api, main: implement global shortcuts for controlling tracking
Issue: #252
That involves moving stuff around to get rid of circular dependencies.
You need to bind keys to shortcuts again this once.
Diffstat (limited to 'opentrack/work.hpp')
-rw-r--r-- | opentrack/work.hpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/opentrack/work.hpp b/opentrack/work.hpp index a3c0e014..4188b937 100644 --- a/opentrack/work.hpp +++ b/opentrack/work.hpp @@ -28,7 +28,6 @@ struct Work mem<Shortcuts> sc; WId handle; using fn = std::function<void(void)>; - using key_opts = Shortcuts::key_opts; using tt = std::tuple<key_opts&, fn>; std::vector<std::tuple<key_opts&, fn>> keys; @@ -38,9 +37,9 @@ struct Work sc(std::make_shared<Shortcuts>()), handle(handle), keys { - tt(sc->s.center, [&]() -> void { tracker->center(); }), - tt(sc->s.toggle, [&]() -> void { tracker->toggle_enabled(); }), - tt(sc->s.zero, [&]() -> void { tracker->zero(); }), + tt(s.key_center, [&]() -> void { tracker->center(); }), + tt(s.key_toggle, [&]() -> void { tracker->toggle_enabled(); }), + tt(s.key_zero, [&]() -> void { tracker->zero(); }), } { reload_shortcuts(); |