diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-07-28 15:55:56 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-08-12 07:47:32 +0200 |
commit | b08cc0ec6f096d0e6764486c81264c24a406bee1 (patch) | |
tree | adae4a54595807dd02e9307ae7c570406aa4ecb7 /src/gui/kernel/qevent.cpp | |
parent | 611558d877a9ee4448b30e5443e3025c6235daaf (diff) |
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 <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
-rw-r--r-- | src/gui/kernel/qevent.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index a002aad387..1b853411f8 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -1307,7 +1307,8 @@ QMoveEvent::~QMoveEvent() */ /*! - Constructs an expose event for the given \a exposeRegion. + Constructs an expose event for the given \a exposeRegion which must be + in local coordinates. */ QExposeEvent::QExposeEvent(const QRegion &exposeRegion) : QEvent(Expose) @@ -1325,7 +1326,7 @@ QExposeEvent::~QExposeEvent() /*! \fn const QRegion &QExposeEvent::region() const - Returns the window area that has been exposed. + Returns the window area that has been exposed. The region is given in local coordinates. */ /*! |