Commit 5f04af56 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Sprinkle static keywords

There is no need to query the environment variables every time kwin
tries to determine the current compositing refresh rate.


(cherry picked from commit 6053bbd2)
parent 47b67a88
......@@ -625,7 +625,7 @@ static bool refreshRate_compare(const AbstractOutput *first, const AbstractOutpu
static int currentRefreshRate()
{
const int refreshRate = qEnvironmentVariableIntValue("KWIN_X11_REFRESH_RATE");
static const int refreshRate = qEnvironmentVariableIntValue("KWIN_X11_REFRESH_RATE");
if (refreshRate) {
return refreshRate;
}
......@@ -635,7 +635,7 @@ static int currentRefreshRate()
return 60000;
}
const QString syncDisplayDevice = qEnvironmentVariable("__GL_SYNC_DISPLAY_DEVICE");
static const QString syncDisplayDevice = qEnvironmentVariable("__GL_SYNC_DISPLAY_DEVICE");
if (!syncDisplayDevice.isEmpty()) {
for (const AbstractOutput *output : outputs) {
if (output->name() == syncDisplayDevice) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment