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/gui/kernel/qwindowsysteminterface.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/kernel/qwindowsysteminterface.h') diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h index 1462c62e2b..580f1f86fa 100644 --- a/src/gui/kernel/qwindowsysteminterface.h +++ b/src/gui/kernel/qwindowsysteminterface.h @@ -138,6 +138,7 @@ public: static void handleTouchCancelEvent(QWindow *w, QTouchDevice *device, Qt::KeyboardModifiers mods = Qt::NoModifier); static void handleTouchCancelEvent(QWindow *w, ulong timestamp, QTouchDevice *device, Qt::KeyboardModifiers mods = Qt::NoModifier); + // rect is relative to parent static void handleGeometryChange(QWindow *w, const QRect &newRect, const QRect &oldRect = QRect()); static void handleCloseEvent(QWindow *w, bool *accepted = 0); static void handleEnterEvent(QWindow *w, const QPointF &local = QPointF(), const QPointF& global = QPointF()); @@ -150,6 +151,7 @@ public: static void handleApplicationStateChanged(Qt::ApplicationState newState, bool forcePropagate = false); + // region is in local coordinates, do not confuse with geometry which is parent-relative static void handleExposeEvent(QWindow *tlw, const QRegion ®ion); #ifndef QT_NO_DRAGANDDROP -- cgit v1.2.3