summaryrefslogtreecommitdiffhomepage
path: root/opentrack/work.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-21 09:55:57 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-21 10:01:09 +0200
commit55eb3e4bf9854fa4341b61dcb78acd5d42cd7f42 (patch)
tree447698c3937d446571e9f63458b57ec9e1e1c1b5 /opentrack/work.hpp
parentedc3091678b3187340190aee4cda79748efb53cb (diff)
ui: cleanup only
Diffstat (limited to 'opentrack/work.hpp')
-rw-r--r--opentrack/work.hpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/opentrack/work.hpp b/opentrack/work.hpp
index c0962b9a..73ba691b 100644
--- a/opentrack/work.hpp
+++ b/opentrack/work.hpp
@@ -15,11 +15,13 @@ struct Work
SelectedLibraries libs;
ptr<Tracker> tracker;
ptr<Shortcuts> sc;
+ WId handle;
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>(handle))
+ sc(std::make_shared<Shortcuts>(handle)),
+ handle(handle)
{
#ifndef _WIN32
QObject::connect(&sc->keyCenter, SIGNAL(activated()), recv, SLOT(shortcutRecentered()));
@@ -31,6 +33,11 @@ struct Work
tracker->start();
}
+ void reload_shortcuts()
+ {
+ sc = std::make_shared<Shortcuts>(handle);
+ }
+
~Work()
{
// order matters, otherwise use-after-free -sh