diff --git a/src/components/bar.cpp b/src/components/bar.cpp index b38c7e87..8e6fd086 100644 --- a/src/components/bar.cpp +++ b/src/components/bar.cpp @@ -585,6 +585,10 @@ void bar::reconfigure_window() { * Used to map mouse clicks to bar actions */ void bar::handle(const evt::button_press& evt) { + if (!m_mutex.try_lock()) { + return; + } + std::lock_guard guard(m_mutex, std::adopt_lock); m_log.trace_x("bar: Received button press: %i at pos(%i, %i)", evt->detail, evt->event_x, evt->event_y);