diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-30 02:30:47 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-30 02:30:47 +0200 |
commit | 5b819219889e78093e0dd32615adb6dcdc66cbcb (patch) | |
tree | 48dcc16ad34ab19a656ce862d8e4472e7ceb77e1 /logic | |
parent | a4836eac5872d06d533e0130230c99148aeb4c7e (diff) |
fix linux hotkeys
Requested-by: @miniskipper and many others
Diffstat (limited to 'logic')
-rw-r--r-- | logic/shortcuts.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/logic/shortcuts.cpp b/logic/shortcuts.cpp index 6d77c3e0..1ffecd3a 100644 --- a/logic/shortcuts.cpp +++ b/logic/shortcuts.cpp @@ -141,8 +141,11 @@ void Shortcuts::reload(const t_keys& keys_) #ifndef _WIN32 const int idx = keys.size() - 1; tt& kk_ = keys[idx]; - auto& fn = std::get<1>(kk_); - connect(k, &QxtGlobalShortcut::activated, [=]() { fn(true); }); + auto fn = std::get<1>(kk_); + connect(k, &QxtGlobalShortcut::activated, [=, fn = std::move(fn)](bool keydown) { + if (keydown || !held) + fn(keydown); + }); #endif } } |