diff --git a/include/components/x11/tray.hpp b/include/components/x11/tray.hpp index 9f73daa6..b66fe63a 100644 --- a/include/components/x11/tray.hpp +++ b/include/components/x11/tray.hpp @@ -184,9 +184,6 @@ class traymanager m_logger.info("Deactivating traymanager"); - if (m_notifythread.joinable()) - m_notifythread.join(); - if (m_sinkattached) { m_connection.detach_sink(this, 2); m_sinkattached = false; @@ -200,6 +197,9 @@ class traymanager m_activated = false; + if (m_notifythread.joinable()) + m_notifythread.join(); + try { if (m_connection.get_selection_owner(m_atom).owner() == m_tray) m_connection.set_selection_owner_checked(XCB_NONE, m_atom, XCB_CURRENT_TIME);