x11: Port X11Output::setGammaRamp() to Application::x11Connection()

It's faster.
This commit is contained in:
Vlad Zahorodnii 2021-08-30 12:35:53 +03:00
parent 96830d2295
commit 813804d5a0

View file

@ -7,7 +7,7 @@
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "x11_output.h"
#include "kwinglobals.h"
#include "main.h"
namespace KWin
{
@ -57,7 +57,7 @@ bool X11Output::setGammaRamp(const GammaRamp &gamma)
return false;
}
xcb_randr_set_crtc_gamma(connection(), m_crtc, gamma.size(), gamma.red(),
xcb_randr_set_crtc_gamma(kwinApp()->x11Connection(), m_crtc, gamma.size(), gamma.red(),
gamma.green(), gamma.blue());
return true;