From 99d921707fc7d1e1e70e703ff1575f5a6e1634bd Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Mon, 19 Aug 2019 16:28:27 +0200 Subject: [PATCH] [platforms/x11/standalone] Fix stored refresh rate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: With 1a11abc821f4 X11 standalone plugin uses the AbstractOutput interface for managing its outputs. In there the refresh rate is stored in 1/μs. Test Plan: currentRefreshRate() provides correct rate. Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D23265 --- plugins/platforms/x11/standalone/x11_output.h | 2 +- plugins/platforms/x11/standalone/x11_platform.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/platforms/x11/standalone/x11_output.h b/plugins/platforms/x11/standalone/x11_output.h index bb6ac6fbe6..ad16363915 100644 --- a/plugins/platforms/x11/standalone/x11_output.h +++ b/plugins/platforms/x11/standalone/x11_output.h @@ -51,7 +51,7 @@ public: void setGeometry(QRect set); /** - * Current refresh rate in 1/ms. + * Current refresh rate in 1/μs = 1000/ms. */ int refreshRate() const override; void setRefreshRate(int set); diff --git a/plugins/platforms/x11/standalone/x11_platform.cpp b/plugins/platforms/x11/standalone/x11_platform.cpp index 2ad2a3f0b5..92a8337912 100644 --- a/plugins/platforms/x11/standalone/x11_platform.cpp +++ b/plugins/platforms/x11/standalone/x11_platform.cpp @@ -528,7 +528,7 @@ void X11StandalonePlatform::doUpdateOutputs() o->setCrtc(crtc); o->setGammaRampSize(gamma.isNull() ? 0 : gamma->size); o->setGeometry(geo); - o->setRefreshRate(refreshRate); + o->setRefreshRate(refreshRate * 1000); QString name; for (int j = 0; j < info->num_outputs; ++j) {