diff --git a/tabbox/tabbox.cpp b/tabbox/tabbox.cpp index c5d53dce92..f397d791f4 100644 --- a/tabbox/tabbox.cpp +++ b/tabbox/tabbox.cpp @@ -777,7 +777,9 @@ void TabBox::hide(bool abort) if (isDisplayed()) qCDebug(KWIN_TABBOX) << "Tab box was not properly closed by an effect"; m_tabBox->hide(abort); - Xcb::sync(); + if (kwinApp()->x11Connection()) { + Xcb::sync(); + } } void TabBox::reconfigure() diff --git a/tabbox/tabboxhandler.cpp b/tabbox/tabboxhandler.cpp index 9edfca2e54..9d8f16ce78 100644 --- a/tabbox/tabboxhandler.cpp +++ b/tabbox/tabboxhandler.cpp @@ -384,7 +384,9 @@ void TabBoxHandler::show() d->show(); } if (d->config.isHighlightWindows()) { - Xcb::sync(); + if (kwinApp()->x11Connection()) { + Xcb::sync(); + } // TODO this should be // QMetaObject::invokeMethod(this, "initHighlightWindows", Qt::QueuedConnection); // but we somehow need to cross > 1 event cycle (likely because of queued invocation in the effects)