diff --git a/options.cpp b/options.cpp index 2bd7a06d58..76ac67a8b9 100644 --- a/options.cpp +++ b/options.cpp @@ -40,7 +40,6 @@ along with this program. If not, see . #include "xcbutils.h" #include -#include #ifndef KWIN_HAVE_OPENGLES #ifndef KWIN_NO_XF86VM #include @@ -100,9 +99,8 @@ int currentRefreshRate() } #endif else if (Xcb::Extensions::self()->isRandrAvailable()) { - XRRScreenConfiguration *config = XRRGetScreenInfo(display(), rootWindow()); - rate = XRRConfigCurrentRate(config); - XRRFreeScreenConfigInfo(config); + Xcb::RandR::ScreenInfo screenInfo(rootWindow()); + rate = screenInfo->rate; } // 0Hz or less is invalid, so we fallback to a default rate diff --git a/xcbutils.h b/xcbutils.h index 6c7c32f311..585a21b601 100644 --- a/xcbutils.h +++ b/xcbutils.h @@ -31,6 +31,7 @@ along with this program. If not, see . #include #include +#include #define class class_name //HACK: work around a non-C++ safe problem in xcb_iccm.h //where they put a variable called "class" in function signatures. //Needed at least for xcb v0.3.8 @@ -234,6 +235,11 @@ public: } }; +namespace RandR +{ +typedef Wrapper ScreenInfo; +} + class ExtensionData { public: