diff options
author | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2014-01-21 17:07:32 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-22 08:30:27 +0100 |
commit | 15f82d0bc40eae635ed1377ae39253a8f515ea4a (patch) | |
tree | cd9d1c39da80d1c7c568afa9330b34fd36b1ff84 /src/hardwareintegration | |
parent | 76d2f1e8ef87f998444ec0a6e3c68c77525cff19 (diff) | |
download | qtwayland-15f82d0bc40eae635ed1377ae39253a8f515ea4a.tar.gz |
Allow resizing the Qt window after the buffers swap
Some EGL implementations resize the EGL buffers after eglSwapBuffers,
so we need to send the geometry change event after the swap, or else
the Qt window size and the physical buffer size will be different to
each other. Do not force this behavior though, but use it only when
the QT_WAYLAND_RESIZE_AFTER_SWAP environment variable is set.
Change-Id: I79e39442b3010c563a81d7c94e747a982e158fc1
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/hardwareintegration')
-rw-r--r-- | src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp index 1e86bd31..dc5bbc3b 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp @@ -90,7 +90,7 @@ void QWaylandEglWindow::setGeometry(const QRect &rect) createDecoration(); QMargins margins = frameMargins(); - QSize sizeWithMargins = geometry().size() + QSize(margins.left() + margins.right(), margins.top() + margins.bottom()); + QSize sizeWithMargins = rect.size() + QSize(margins.left() + margins.right(), margins.top() + margins.bottom()); if (m_waylandEglWindow) { int current_width, current_height; |