summaryrefslogtreecommitdiffhomepage
path: root/opentrack/work.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack/work.hpp')
-rw-r--r--opentrack/work.hpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/opentrack/work.hpp b/opentrack/work.hpp
index bd69f7ba..c0962b9a 100644
--- a/opentrack/work.hpp
+++ b/opentrack/work.hpp
@@ -16,14 +16,17 @@ struct Work
ptr<Tracker> tracker;
ptr<Shortcuts> sc;
- Work(main_settings& s, Mappings& m, SelectedLibraries& libs, QObject* recv) :
+ Work(main_settings& s, Mappings& m, SelectedLibraries& libs, QObject* recv, WId handle) :
s(s), libs(libs),
tracker(std::make_shared<Tracker>(s, m, libs)),
- sc(std::make_shared<Shortcuts>())
+ sc(std::make_shared<Shortcuts>(handle))
{
#ifndef _WIN32
QObject::connect(&sc->keyCenter, SIGNAL(activated()), recv, SLOT(shortcutRecentered()));
QObject::connect(&sc->keyToggle, SIGNAL(activated()), recv, SLOT(shortcutToggled()));
+#else
+ QObject::connect(sc->keybindingWorker.get(), SIGNAL(center()), recv, SLOT(shortcutRecentered()));
+ QObject::connect(sc->keybindingWorker.get(), SIGNAL(toggle()), recv, SLOT(shortcutToggled()));
#endif
tracker->start();
}
@@ -34,4 +37,4 @@ struct Work
tracker = nullptr;
libs = SelectedLibraries();
}
-}; \ No newline at end of file
+};