fix(signals): Use pointer to value

Only pass pointers to emitted signal value since the signal receivers
will be called on the same thread as the signal emitter.

Refs 
This commit is contained in:
Michael Carlberg 2017-01-09 18:49:22 +01:00
parent 5f6a1f5ae6
commit f4406783e2
6 changed files with 10 additions and 30 deletions
src/components

View file

@ -514,7 +514,7 @@ void bar::handle(const evt::leave_notify&) {
if (!m_opts.dimmed) {
m_taskqueue->defer_unique("window-dim", 3s, [&](size_t) {
m_opts.dimmed = true;
m_sig.emit(dim_window{m_opts.dimvalue});
m_sig.emit(dim_window{double(m_opts.dimvalue)});
});
}
}