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.
This commit is contained in:
Martin Flöser 2017-08-23 11:51:18 +02:00
parent c87230c3a5
commit 12cb1c108e

View file

@ -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);
}
}
}