From 01b3ff0709003f4191760f53b14bebea4d88c3d9 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 4 May 2016 08:20:02 +0200 Subject: api: fix shortcuts for OSX and Linux --- opentrack/shortcuts.cpp | 4 ++-- opentrack/shortcuts.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'opentrack') diff --git a/opentrack/shortcuts.cpp b/opentrack/shortcuts.cpp index aa1006c4..3773179f 100644 --- a/opentrack/shortcuts.cpp +++ b/opentrack/shortcuts.cpp @@ -85,7 +85,7 @@ void Shortcuts::receiver(const Key& k) } #endif -void Shortcuts::reload(const std::vector> &keys_) +void Shortcuts::reload(std::vector> &keys_) { const int sz = keys_.size(); keys = std::vector(); @@ -100,7 +100,7 @@ void Shortcuts::reload(const std::vector> &keys bind_keyboard_shortcut(k, opts, held); keys.push_back(tt(k, fun, held)); #ifndef _WIN32 - connect(k.get(), &QxtGlobalShortcut::activated, fun); + connect(k.get(), &QxtGlobalShortcut::activated, [&]() -> void { fun(true); }); #endif } } diff --git a/opentrack/shortcuts.h b/opentrack/shortcuts.h index 40d41957..fd732f89 100644 --- a/opentrack/shortcuts.h +++ b/opentrack/shortcuts.h @@ -59,7 +59,7 @@ public: #endif {} - void reload(const std::vector> &keys); + void reload(std::vector> &keys_); private: void bind_keyboard_shortcut(K &key, const key_opts& k, bool held); #ifdef _WIN32 -- cgit v1.2.3