diff --git a/src/daemon/TreelandConnector.cpp b/src/daemon/TreelandConnector.cpp index ecce431..f950760 100644 --- a/src/daemon/TreelandConnector.cpp +++ b/src/daemon/TreelandConnector.cpp @@ -205,6 +205,8 @@ void TreelandConnector::connect(QString socketPath) { wl_display_roundtrip(m_display); + while (wl_display_dispatch_pending(m_display) > 0); + wl_display_flush(m_display); m_notifier = new QSocketNotifier(wl_display_get_fd(m_display), QSocketNotifier::Read); QObject::connect(m_notifier, &QSocketNotifier::activated, this, [this] { if (wl_display_dispatch(m_display) == -1 || wl_display_flush(m_display) == -1) {