Only call xcb_flush in performCompositing if we have an X11 connection

Summary: Otherwise KWin crashes when operating without XWayland support.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7892
This commit is contained in:
Martin Flöser 2017-09-20 19:32:54 +02:00
parent d16f63b6e6
commit e8664f83b9

View file

@ -709,7 +709,9 @@ void Compositor::performCompositing()
if (damaged.count() > 0) {
m_scene->triggerFence();
xcb_flush(connection());
if (auto c = kwinApp()->x11Connection()) {
xcb_flush(c);
}
}
// Move elevated windows to the top of the stacking order