From 1ab0724347713e08c2db457fc8eecf86257c460b Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Sat, 15 Oct 2016 03:33:35 +0200 Subject: [PATCH] fix(tray): Join notify thread after setting activate state --- include/components/x11/tray.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);