From 5e002bc961bc4873e82b7637f1ec4c310e107cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 4 May 2012 16:31:52 +0200 Subject: [PATCH] Implemented refresh rate support. Implements QWaylandScreen::refreshRate() based on the wl_output mode information we get from the compositor. In the compositor, adds API to override the refresh rate, with the default set to whatever QScreen reports on the compositor-side. Change-Id: I5f5175f2498940875c6ec68d29d25cf5993a1e65 Reviewed-by: Laszlo Agocs --- tests/auto/wayland/mockoutput.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/auto/wayland/mockoutput.cpp b/tests/auto/wayland/mockoutput.cpp index 18773f021fe..8066c217248 100644 --- a/tests/auto/wayland/mockoutput.cpp +++ b/tests/auto/wayland/mockoutput.cpp @@ -64,7 +64,8 @@ void Compositor::sendOutputGeometry(wl_resource *resource) void Compositor::sendOutputMode(wl_resource *resource) { - wl_output_send_mode(resource, WL_OUTPUT_MODE_CURRENT | WL_OUTPUT_MODE_PREFERRED, 640, 480, 60); + const QRect &r = m_outputGeometry; + wl_output_send_mode(resource, WL_OUTPUT_MODE_CURRENT | WL_OUTPUT_MODE_PREFERRED, r.width(), r.height(), 60); } void Compositor::setOutputGeometry(void *c, const QList ¶meters)