Only query once for XFree86-VidModeExtension
currentRefreshRate is called after each randr event and we don't need to query the extension each time. REVIEW: 122272
This commit is contained in:
parent
9144b03688
commit
c4807c5b60
1 changed files with 2 additions and 1 deletions
|
@ -55,7 +55,8 @@ int currentRefreshRate()
|
|||
else if (GLPlatform::instance()->driver() == Driver_NVidia) {
|
||||
#ifndef KWIN_NO_XF86VM
|
||||
int major, event, error;
|
||||
if (XQueryExtension(display(), "XFree86-VidModeExtension", &major, &event, &error)) {
|
||||
static const bool s_hasVidMode = XQueryExtension(display(), "XFree86-VidModeExtension", &major, &event, &error);
|
||||
if (s_hasVidMode) {
|
||||
XF86VidModeModeLine modeline;
|
||||
int dotclock, vtotal;
|
||||
if (XF86VidModeGetModeLine(display(), 0, &dotclock, &modeline)) {
|
||||
|
|
Loading…
Reference in a new issue