From b08cc0ec6f096d0e6764486c81264c24a406bee1 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 28 Jul 2014 15:55:56 +0200 Subject: Make the expose region local on all platforms QExposeEvent::region() reports a region in a random coordinate system. The behavior is undocumented and the platform plugins do different things. xcb, offscreen and ios are correct. These set the region in local coordinates, which is the most logical interpretation of the expose region. windows is almost correct, except for one occurrence. cocoa and others need changes: passing in geometry() as the exposed region is always wrong. The patch documents the expected behavior both for QExposeEvent and internally in QWindowSystemInterface. The problematic plugins are fixed to use local coordinates. Task-number: QTBUG-40470 Change-Id: I6ded3154d14254fa71d4292d8e1b5e6cf696c81a Reviewed-by: Gunnar Sletta --- src/plugins/platforms/qnx/qqnxwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/platforms/qnx/qqnxwindow.cpp') diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index 5a405f9577..56f17e6d11 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -252,7 +252,7 @@ void QQnxWindow::setGeometry(const QRect &rect) setGeometryHelper(newGeometry); if (isExposed()) - QWindowSystemInterface::handleExposeEvent(window(), newGeometry); + QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(0, 0), newGeometry.size())); } void QQnxWindow::setGeometryHelper(const QRect &rect) @@ -306,7 +306,7 @@ void QQnxWindow::setVisible(bool visible) root->updateVisibility(root->m_visible); - QWindowSystemInterface::handleExposeEvent(window(), window()->geometry()); + QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(0, 0), window()->geometry().size())); if (visible) { applyWindowState(); @@ -345,7 +345,7 @@ void QQnxWindow::setExposed(bool exposed) if (m_exposed != exposed) { m_exposed = exposed; - QWindowSystemInterface::handleExposeEvent(window(), window()->geometry()); + QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(0, 0), window()->geometry().size())); } } -- cgit v1.2.3