From 12cb1c108e5b543d2bb0a421534e00c7598f8d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Wed, 23 Aug 2017 11:51:18 +0200 Subject: [PATCH] Port Compositor::deleteUnusedSupportProperties away from global x11 connection Was already using the connection exposed by KWin::Application for parts of the code. This makes the whole code use the KWin::Application code. --- composite.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composite.cpp b/composite.cpp index 50791a87e8..4bb816869e 100644 --- a/composite.cpp +++ b/composite.cpp @@ -464,10 +464,10 @@ void Compositor::deleteUnusedSupportProperties() m_unusedSupportPropertyTimer.start(); return; } - if (kwinApp()->x11Connection()) { + if (const auto c = kwinApp()->x11Connection()) { foreach (const xcb_atom_t &atom, m_unusedSupportProperties) { // remove property from root window - xcb_delete_property(connection(), rootWindow(), atom); + xcb_delete_property(c, kwinApp()->x11RootWindow(), atom); } } }