diff options
author | Liang Qi <liang.qi@qt.io> | 2017-09-27 14:30:08 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-09-27 15:10:13 +0200 |
commit | ef69b4d772304efcc3b9141900f4e76642d4873b (patch) | |
tree | be32cebe5d78f424fba33808966982312998a277 /tests/auto/client | |
parent | 064feb4fd76e6adbfcafe449d6ae7f52834c538a (diff) | |
parent | ffee1b3fb8c8e76d9317547376c8f13b0e17b494 (diff) |
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
src/client/qwaylandwindow.cpp
src/client/qwaylandwindow_p.h
src/compositor/compositor_api/qwaylandpointer.cpp
Change-Id: Icbc22a1ae3cdd9cde438742817d07fccf97f647b
Diffstat (limited to 'tests/auto/client')
-rw-r--r-- | tests/auto/client/client/tst_client.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp index 0c9c007a2..8acddfbe7 100644 --- a/tests/auto/client/client/tst_client.cpp +++ b/tests/auto/client/client/tst_client.cpp @@ -142,6 +142,7 @@ private slots: void backingStore(); void touchDrag(); void mouseDrag(); + void dontCrashOnMultipleCommits(); private: MockCompositor *compositor; @@ -333,6 +334,32 @@ void tst_WaylandClient::mouseDrag() QTRY_VERIFY(window.dragStarted); } +void tst_WaylandClient::dontCrashOnMultipleCommits() +{ + auto window = new TestWindow(); + window->show(); + + QRect rect(QPoint(), window->size()); + + QBackingStore backingStore(window); + backingStore.resize(rect.size()); + backingStore.beginPaint(rect); + QPainter p(backingStore.paintDevice()); + p.fillRect(rect, Qt::magenta); + p.end(); + backingStore.endPaint(); + + backingStore.flush(rect); + backingStore.flush(rect); + backingStore.flush(rect); + + compositor->processWaylandEvents(); + + delete window; + + QTRY_VERIFY(!compositor->surface()); +} + int main(int argc, char **argv) { setenv("XDG_RUNTIME_DIR", ".", 1); |