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/gui/kernel/qwindowsysteminterface_qpa.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gui/kernel/qwindowsysteminterface_qpa.cpp') diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.cpp b/src/gui/kernel/qwindowsysteminterface_qpa.cpp index 83cf8c338c..c3136b0b0a 100644 --- a/src/gui/kernel/qwindowsysteminterface_qpa.cpp +++ b/src/gui/kernel/qwindowsysteminterface_qpa.cpp @@ -434,6 +434,13 @@ void QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QScreen *scree QWindowSystemInterfacePrivate::queueWindowSystemEvent(e); } +void QWindowSystemInterface::handleScreenRefreshRateChange(QScreen *screen, qreal newRefreshRate) +{ + QWindowSystemInterfacePrivate::ScreenRefreshRateEvent *e = + new QWindowSystemInterfacePrivate::ScreenRefreshRateEvent(screen, newRefreshRate); + QWindowSystemInterfacePrivate::queueWindowSystemEvent(e); +} + void QWindowSystemInterface::handleThemeChange(QWindow *tlw) { QWindowSystemInterfacePrivate::ThemeChangeEvent *e = new QWindowSystemInterfacePrivate::ThemeChangeEvent(tlw); -- cgit v1.2.3