Drop XRandR dependency from Options's currentRefreshRate

Summary:
This code branch was dead. It was for the case that the number of screens
is 0, but KWin::Screens never has a count of zero, especially not the
XRandR based screens (c.f. screens_xrandr.cpp method ::update) which has
a fallback handling setting the count to always 1 if there are no screens.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7650
icc-effect-5.14.5
Martin Flöser 2017-09-02 09:43:55 +02:00
parent 5c20e5c049
commit 536739f095
1 changed files with 0 additions and 5 deletions

View File

@ -31,7 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "screens.h"
#include "settings.h"
#include "xcbutils.h"
#include <kwinglplatform.h>
#include <QOpenGLContext>
@ -67,10 +66,6 @@ int currentRefreshRate()
}
}
rate = qRound(Screens::self()->refreshRate(syncScreen)); // TODO forward float precision?
} else if (Xcb::Extensions::self()->isRandrAvailable()) {
// last restort - query XRandR screenInfo rate - probably wrong on nvidia systems
Xcb::RandR::ScreenInfo screenInfo(rootWindow());
rate = screenInfo->rate;
}
// 0Hz or less is invalid, so we fallback to a default rate