[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!
This commit is contained in:
parent
a74f8766c3
commit
3ce9a4a179
2 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
if (kwinApp()->x11Connection()) {
|
||||
Xcb::sync();
|
||||
}
|
||||
}
|
||||
|
||||
void TabBox::reconfigure()
|
||||
|
|
|
@ -384,7 +384,9 @@ void TabBoxHandler::show()
|
|||
d->show();
|
||||
}
|
||||
if (d->config.isHighlightWindows()) {
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue