summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-25 05:07:05 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-25 05:07:05 +0200
commit37c10386155bc4fed4db910fcd5c7662347f576e (patch)
treef30d9896af9bf834a0d7ea7c749dc81bbcf84c08
parent5ca330e1fd5890ad4504abd5c63f2802e0d2bb87 (diff)
shortcuts: prototyped for Linux
-rw-r--r--opentrack/shortcuts.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/opentrack/shortcuts.cpp b/opentrack/shortcuts.cpp
index 56071418..d68da30e 100644
--- a/opentrack/shortcuts.cpp
+++ b/opentrack/shortcuts.cpp
@@ -125,15 +125,13 @@ void KeybindingWorker::run() {
void Shortcuts::bind_keyboard_shortcut(K &key, key_opts& k)
{
#if !defined(_WIN32)
-
- if (key)
- {
+ if (!key)
+ key = std::make_shared<QxtGlobalShortcut>();
+ else {
key->setEnabled(false);
key->setShortcut(QKeySequence::UnknownKey);
}
- key = std::make_shared<QxtGlobalShortcut>();
-
if (k.keycode)
{
key->setShortcut(QKeySequence(k.keycode));