src/components/bar.cpp
/**
 * Event handler for XCB_LEAVE_NOTIFY events
 *
 * Used to dim the window by setting the
 * _NET_WM_WINDOW_OPACITY atom value
 */
Event handler for XCB_LEAVE_NOTIFY events
Used to dim the window by setting the
_NET_WM_WINDOW_OPACITY atom value
Event handler for XCB_LEAVE_NOTIFY events Used to dim the window by setting the _NET_WM_WINDOW_OPACITY atom value
void bar::handle(const evt::leave_notify&) {
  if (m_opts.dimvalue < 1.0) {
    if (!m_opts.dimmed) {
      m_dim_timer->start(3000, 0, [this]() {
        m_opts.dimmed = true;
        m_sig.emit(dim_window{double(m_opts.dimvalue)});
      });
    }
  }
}
void bar :: handle ( const evt :: leave_notify & ) { if ( m_opts . dimvalue < 1.0 ) { if ( ! m_opts . dimmed ) { m_dim_timer -> start ( 3000 , 0 , [ this ] ( ) { m_opts . dimmed = true ; m_sig . emit ( dim_window { double ( m_opts . dimvalue ) } ) ; } ) ; } } }
Event handler for XCB_LEAVE_NOTIFY events
 Used to dim the window by setting the
 _NET_WM_WINDOW_OPACITY atom value
Event handler for XCB_LEAVE_NOTIFY events Used to dim the window by setting the _NET_WM_WINDOW_OPACITY atom value
// Only trigger dimming, if the dim-value is not fully opaque.