From 813804d5a066a9918218780e0aa9252e8af24502 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 30 Aug 2021 12:35:53 +0300 Subject: [PATCH] x11: Port X11Output::setGammaRamp() to Application::x11Connection() It's faster. --- src/plugins/platforms/x11/standalone/x11_output.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/x11/standalone/x11_output.cpp b/src/plugins/platforms/x11/standalone/x11_output.cpp index 087891723a..153bd74f5e 100644 --- a/src/plugins/platforms/x11/standalone/x11_output.cpp +++ b/src/plugins/platforms/x11/standalone/x11_output.cpp @@ -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;