Commit 3ce9a4a1 authored by Martin Flöser's avatar Martin Flöser

[tabbox] Guard Xcb::sync with whether we have an X11 connection

Otherwise crash on WaylandOnly once you Alt+Tab. Credits go to our
integration tests for finding this issue!
parent a74f8766
......@@ -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()
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment