Skip to content

Commit

Permalink
Fix Q(Quick)Window on eglfs
Browse files Browse the repository at this point in the history
The call to QPlatformWindow::setRect (for storing into d->rect) was
in the wrong place. It has to be the potentially-overridden value.

Amends 3a31c70

Task-number: QTBUG-57608
Change-Id: Id3c35e2dc178f7bd2f9643e8ae4754c8f2f39240
Reviewed-by: Friedemann Kleint <[email protected]>
  • Loading branch information
alpqr committed Aug 3, 2017
1 parent d12d294 commit 51446c3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/plugins/platforms/eglfs/api/qeglfswindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,18 +235,15 @@ void QEglFSWindow::setVisible(bool visible)

void QEglFSWindow::setGeometry(const QRect &r)
{
// Persist the requested rect, like a normal setGeometry call
QPlatformWindow::setGeometry(r);

// Take care of WM behavior, constrain/modify geometry
QRect rect = r;
if (m_flags.testFlag(HasNativeWindow))
rect = screen()->availableGeometry();

// React to the setGeometry, as if from a WM callback
QRect lastReportedGeometry = qt_window_private(window())->geometry;
QPlatformWindow::setGeometry(rect);

QWindowSystemInterface::handleGeometryChange(window(), rect);

const QRect lastReportedGeometry = qt_window_private(window())->geometry;
if (rect != lastReportedGeometry)
QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(0, 0), rect.size()));
}
Expand Down

0 comments on commit 51446c3

Please sign in to comment.