From f280efc6201adf8933c9d48a1d5b6983ee9fed9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 4 May 2012 13:10:41 +0200 Subject: Added QScreen::refreshRate() to get the vertical refresh rate. To give applications that want it the option to use a fixed timestep for animations, and to avoid having values of 60 hard-coded (we have a couple of those in qtdeclarative/src/quick already), we need to know the refresh rates of the screens we are rendering to. Change-Id: Ife49162e830440ad7eab563a27e8aebbbafc5fc5 Reviewed-by: Girish Ramakrishnan Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll --- src/plugins/platforms/xcb/qxcbconnection.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/plugins/platforms/xcb/qxcbconnection.h') diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h index 34943bfdef..86eaf5d7d9 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.h +++ b/src/plugins/platforms/xcb/qxcbconnection.h @@ -355,6 +355,7 @@ public: bool hasXFixes() const { return xfixes_first_event > 0; } bool hasXShape() const { return has_shape_extension; } + bool hasXRandr() const { return has_randr_extension; } bool hasInputShape() const { return has_input_shape; } private slots: @@ -365,6 +366,7 @@ private: void sendConnectionEvent(QXcbAtom::Atom atom, uint id = 0); void initializeXFixes(); void initializeXRender(); + void initializeXRandr(); void initializeXShape(); #ifdef XCB_USE_DRI2 void initializeDri2(); @@ -432,8 +434,10 @@ private: QVector m_peekFuncs; uint32_t xfixes_first_event; + uint32_t xrandr_first_event; bool has_shape_extension; + bool has_randr_extension; bool has_input_shape; }; -- cgit v1.2.3