From 55eb3e4bf9854fa4341b61dcb78acd5d42cd7f42 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 21 Oct 2014 09:55:57 +0200 Subject: ui: cleanup only --- opentrack/work.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'opentrack') 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; ptr sc; + WId handle; Work(main_settings& s, Mappings& m, SelectedLibraries& libs, QObject* recv, WId handle) : s(s), libs(libs), tracker(std::make_shared(s, m, libs)), - sc(std::make_shared(handle)) + sc(std::make_shared(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(handle); + } + ~Work() { // order matters, otherwise use-after-free -sh -- cgit v1.2.3