diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-10-12 10:36:23 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-10-26 11:05:07 +0000 |
commit | 16a98829a664403f2fb8962884701f5d4d31cacd (patch) | |
tree | dc294a64f88b705b9aa9f5db8f532e1187bd62ee /src/client/qwaylandwindow.cpp | |
parent | 88a0246a46c30e08e9730d16cf8739773447d058 (diff) |
Client: Don't spam expose events
Only send expose event when the geometry actually changed.
Change-Id: Ic06986ce5d11e0ff7a842303f57093b8ff25b9f6
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client/qwaylandwindow.cpp')
-rw-r--r-- | src/client/qwaylandwindow.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 1801c2a4b..4ac2ca51e 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -338,7 +338,9 @@ void QWaylandWindow::setGeometry(const QRect &rect) mSentInitialResize = true; } - sendExposeEvent(QRect(QPoint(), geometry().size())); + QRect exposeGeometry(QPoint(), geometry().size()); + if (exposeGeometry != mLastExposeGeometry) + sendExposeEvent(exposeGeometry); } void QWaylandWindow::resizeFromApplyConfigure(const QSize &sizeWithMargins, const QPoint &offset) @@ -356,6 +358,7 @@ void QWaylandWindow::sendExposeEvent(const QRect &rect) { if (!(mShellSurface && mShellSurface->handleExpose(rect))) QWindowSystemInterface::handleExposeEvent(window(), rect); + mLastExposeGeometry = rect; } |