diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-11-01 10:14:20 +0100 |
---|---|---|
committer | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-11-04 13:00:54 +0100 |
commit | e7c9adccf89ed13dd2a693bf0555062729a624e8 (patch) | |
tree | 306799ed1fd3493e07854f60d9bd3c1e3d6a1478 /tests/auto/client/surface/tst_surface.cpp | |
parent | 62e959eaa707a163daca69a42c733bbd272d41d6 (diff) | |
download | qtwayland-e7c9adccf89ed13dd2a693bf0555062729a624e8.tar.gz |
Add basic client test for subsurfaces
Change-Id: I1ef21287933a2afccad989f47e4fe59329b6f537
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'tests/auto/client/surface/tst_surface.cpp')
-rw-r--r-- | tests/auto/client/surface/tst_surface.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/client/surface/tst_surface.cpp b/tests/auto/client/surface/tst_surface.cpp index dddff086..451fbac7 100644 --- a/tests/auto/client/surface/tst_surface.cpp +++ b/tests/auto/client/surface/tst_surface.cpp @@ -41,6 +41,8 @@ private slots: void waitForFrameCallbackRaster(); void waitForFrameCallbackGl(); void negotiateShmFormat(); + + void createSubsurface(); }; void tst_surface::createDestroySurface() @@ -154,5 +156,21 @@ void tst_surface::negotiateShmFormat() }); } +void tst_surface::createSubsurface() +{ + QRasterWindow window; + window.resize(64, 64); + window.show(); + QCOMPOSITOR_TRY_VERIFY(xdgToplevel()); + exec([=] { xdgToplevel()->sendCompleteConfigure(); }); + QCOMPOSITOR_TRY_VERIFY(xdgSurface()->m_committedConfigureSerial); + + QRasterWindow subWindow; + subWindow.setParent(&window); + subWindow.resize(64, 64); + subWindow.show(); + QCOMPOSITOR_TRY_VERIFY(subSurface()); +} + QCOMPOSITOR_TEST_MAIN(tst_surface) #include "tst_surface.moc" |