From e8664f83b9643b85f55a9eb28b7cd4c2cd15b4e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Wed, 20 Sep 2017 19:32:54 +0200 Subject: [PATCH] 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 --- composite.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/composite.cpp b/composite.cpp index 767f0850db..ca984004ac 100644 --- a/composite.cpp +++ b/composite.cpp @@ -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