QNX: Fix screen rotation
The behavior introduced by qtdeclarative's 475d1ed4f6a2 mandates that an expose event follows a geometry change event. The fix for this uncovered a bug on the raster backing store which caused the rotation to break on QtWidgets. The problem was rooted on the assumption that the QQnxRasterBackingStore::flush() method was only called after paints to the backing store surface, which was discovered to be a false assumption. Flushing the backing store can occur in other circunstances, which are out of scope on the context of the QNX plugin. Task-number: QTBUG-31329 Change-Id: Icfc3e85324f5a8745f6b5f189f27f8b763f770c7 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
parent
5f49467c52
commit
0343b92660
@ -81,6 +81,12 @@ void QQnxRasterBackingStore::flush(QWindow *window, const QRegion ®ion, const
|
|||||||
{
|
{
|
||||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << this->window();
|
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << this->window();
|
||||||
|
|
||||||
|
// Sometimes this method is called even though there is nothing to be
|
||||||
|
// flushed, for instance, after an expose event directly follows a
|
||||||
|
// geometry change event.
|
||||||
|
if (!m_hasUnflushedPaintOperations)
|
||||||
|
return;
|
||||||
|
|
||||||
QQnxWindow *targetWindow = 0;
|
QQnxWindow *targetWindow = 0;
|
||||||
if (window)
|
if (window)
|
||||||
targetWindow = static_cast<QQnxWindow *>(window->handle());
|
targetWindow = static_cast<QQnxWindow *>(window->handle());
|
||||||
@ -117,7 +123,6 @@ void QQnxRasterBackingStore::flush(QWindow *window, const QRegion ®ion, const
|
|||||||
|
|
||||||
// We assume that the TLW has been flushed previously and that no changes were made to the
|
// We assume that the TLW has been flushed previously and that no changes were made to the
|
||||||
// backing store inbetween (### does Qt guarantee this?)
|
// backing store inbetween (### does Qt guarantee this?)
|
||||||
Q_ASSERT(!m_hasUnflushedPaintOperations);
|
|
||||||
|
|
||||||
targetWindow->adjustBufferSize();
|
targetWindow->adjustBufferSize();
|
||||||
targetWindow->blitFrom(platformWindow, offset, region);
|
targetWindow->blitFrom(platformWindow, offset, region);
|
||||||
|
@ -199,6 +199,7 @@ void QQnxWindow::setGeometry(const QRect &rect)
|
|||||||
// could result in re-entering QQnxWindow::setGeometry() again.
|
// could result in re-entering QQnxWindow::setGeometry() again.
|
||||||
QWindowSystemInterface::setSynchronousWindowsSystemEvents(true);
|
QWindowSystemInterface::setSynchronousWindowsSystemEvents(true);
|
||||||
QWindowSystemInterface::handleGeometryChange(window(), rect);
|
QWindowSystemInterface::handleGeometryChange(window(), rect);
|
||||||
|
QWindowSystemInterface::handleExposeEvent(window(), rect);
|
||||||
QWindowSystemInterface::setSynchronousWindowsSystemEvents(false);
|
QWindowSystemInterface::setSynchronousWindowsSystemEvents(false);
|
||||||
|
|
||||||
// Now move all children.
|
// Now move all children.
|
||||||
|
Loading…
Reference in New Issue
Block a user