diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-02-26 16:52:18 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-03-08 16:29:45 +0000 |
commit | 0177295c91cccc4394de41cd4d01f2736bf2ad43 (patch) | |
tree | 24b509519b65c1e2085dccd170088220ecd40505 /tests/auto/client/client/tst_client.cpp | |
parent | 18175b6eb8d8cfdc12003186ec1829579a35fef4 (diff) |
Send configure events in shell-agnostic client tests
xdg-shell >= unstable v6 requires surfaces to be configured before buffers can
be attached. Make sure to send a configure event when a compositor would
normally do it.
Task-number: QTBUG-66510
Change-Id: Icbff6ebaa597e858d92d621849aa0df7a8a976f3
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'tests/auto/client/client/tst_client.cpp')
-rw-r--r-- | tests/auto/client/client/tst_client.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp index 02c5bab3e..1e3d0f1d1 100644 --- a/tests/auto/client/client/tst_client.cpp +++ b/tests/auto/client/client/tst_client.cpp @@ -226,6 +226,8 @@ void tst_WaylandClient::windowScreens() QSharedPointer<MockSurface> surface; QTRY_VERIFY(surface = compositor->surface()); + compositor->sendShellSurfaceConfigure(surface); + QTRY_COMPARE(QGuiApplication::screens().size(), 1); QScreen *primaryScreen = QGuiApplication::screens().first(); QCOMPARE(window.screen(), primaryScreen); @@ -267,6 +269,7 @@ void tst_WaylandClient::removePrimaryScreen() QSharedPointer<MockSurface> surface; QTRY_VERIFY(surface = compositor->surface()); + compositor->sendShellSurfaceConfigure(surface); QTRY_COMPARE(QGuiApplication::screens().size(), 1); QScreen *primaryScreen = QGuiApplication::screens().first(); QCOMPARE(window.screen(), primaryScreen); @@ -308,6 +311,9 @@ void tst_WaylandClient::events() QSharedPointer<MockSurface> surface; QTRY_VERIFY(surface = compositor->surface()); + compositor->sendShellSurfaceConfigure(surface); + + QTRY_VERIFY(window.isExposed()); QCOMPARE(window.focusInEventCount, 0); compositor->setKeyboardFocus(surface); @@ -363,6 +369,7 @@ void tst_WaylandClient::backingStore() QSharedPointer<MockSurface> surface; QTRY_VERIFY(surface = compositor->surface()); + compositor->sendShellSurfaceConfigure(surface); QRect rect(QPoint(), window.size()); @@ -435,6 +442,7 @@ void tst_WaylandClient::touchDrag() QSharedPointer<MockSurface> surface; QTRY_VERIFY(surface = compositor->surface()); + compositor->sendShellSurfaceConfigure(surface); compositor->setKeyboardFocus(surface); QTRY_COMPARE(QGuiApplication::focusWindow(), &window); @@ -460,6 +468,7 @@ void tst_WaylandClient::mouseDrag() QSharedPointer<MockSurface> surface; QTRY_VERIFY(surface = compositor->surface()); + compositor->sendShellSurfaceConfigure(surface); compositor->setKeyboardFocus(surface); QTRY_COMPARE(QGuiApplication::focusWindow(), &window); @@ -528,6 +537,7 @@ void tst_WaylandClient::hiddenPopupParent() // with the set_popup request. QSharedPointer<MockSurface> surface; QTRY_VERIFY(surface = compositor->surface()); + compositor->sendShellSurfaceConfigure(surface); QPoint mousePressPos(16, 16); QCOMPARE(toplevel.mousePressEventCount, 0); compositor->sendMousePress(surface, toplevel.frameOffset() + mousePressPos); @@ -552,6 +562,7 @@ void tst_WaylandClient::glWindow() testWindow->show(); QSharedPointer<MockSurface> surface; QTRY_VERIFY(surface = compositor->surface()); + compositor->sendShellSurfaceConfigure(surface); QTRY_VERIFY(testWindow->paintGLCalled); |