Changeset View
Changeset View
Standalone View
Standalone View
options.cpp
Show All 35 Lines | |||||
36 | 36 | | |||
37 | #endif //KCMRULES | 37 | #endif //KCMRULES | ||
38 | 38 | | |||
39 | namespace KWin | 39 | namespace KWin | ||
40 | { | 40 | { | ||
41 | 41 | | |||
42 | #ifndef KCMRULES | 42 | #ifndef KCMRULES | ||
43 | 43 | | |||
44 | int currentRefreshRate() | | |||
45 | { | | |||
46 | return Options::currentRefreshRate(); | | |||
47 | } | | |||
48 | | ||||
49 | int Options::currentRefreshRate() | 44 | int Options::currentRefreshRate() | ||
50 | { | 45 | { | ||
51 | int rate = -1; | 46 | int rate = -1; | ||
52 | QString syncScreenName(QLatin1String("primary screen")); | 47 | QString syncScreenName(QLatin1String("primary screen")); | ||
53 | if (options->refreshRate() > 0) { // use manually configured refresh rate | 48 | if (options->refreshRate() > 0) { // use manually configured refresh rate | ||
54 | rate = options->refreshRate(); | 49 | rate = options->refreshRate(); | ||
55 | } else if (Screens::self()->count() > 0) { | 50 | } else if (Screens::self()->count() > 0) { | ||
56 | // prefer the refreshrate calculated from the screens mode information | 51 | // prefer the refreshrate calculated from the screens mode information | ||
▲ Show 20 Lines • Show All 1092 Lines • Show Last 20 Lines |