summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbscreen.h
diff options
context:
space:
mode:
authorKirill Burtsev <kirill.burtsev@qt.io>2019-07-01 18:44:39 +0200
committerKirill Burtsev <kirill.burtsev@qt.io>2019-10-04 17:18:41 +0200
commit425c59783c960e9f568b6c5e8920774ada9b87e5 (patch)
tree7a68a6b2cdc8f1f41d8d12e714f313e87d2c4f9a /src/plugins/platforms/xcb/qxcbscreen.h
parent932805807123833bb8f5ae9abda7e946f48d9f0c (diff)
Xcb: fix rounding error in reporting screen refresh rate
Screen refresh rate might not be just integer but with decimal part like, for example, 59.97 Hz. Fix calculation from raw xcb data and its store type as it is qreal already for QScreen::refreshRate API. Task-number: QTBUG-73911 Change-Id: Ia0494e953176c2854f0ed42c4498a29cfef16106 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbscreen.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h
index ec3b07bfb7..914ce6307d 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.h
+++ b/src/plugins/platforms/xcb/qxcbscreen.h
@@ -226,7 +226,7 @@ private:
QRect m_availableGeometry;
Qt::ScreenOrientation m_orientation = Qt::PrimaryOrientation;
QXcbCursor *m_cursor;
- int m_refreshRate = 60;
+ qreal m_refreshRate = 60.0;
int m_pixelDensity = 1;
QEdidParser m_edid;
};