summaryrefslogtreecommitdiff
path: root/tests/auto/client/surface
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-11-05 07:48:33 +0100
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-11-05 11:35:46 +0100
commitb990f98b44ced37a319d7f476fad7bfb3e070be0 (patch)
tree171a797b6e82a9433e047de7a2ffe475e544a1e8 /tests/auto/client/surface
parentd4ac2c9915fed87193cd2cf7ac438a9fa8edc126 (diff)
parent09474cdf5244ce6fba51a6b01bfe50caf7635c66 (diff)
downloadqtwayland-b990f98b44ced37a319d7f476fad7bfb3e070be0.tar.gz
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts: src/client/qwaylanddisplay.cpp src/client/qwaylandwindow.cpp Change-Id: I30ddf5305b3087b93cf4d6e562fd0146dea61cc0
Diffstat (limited to 'tests/auto/client/surface')
-rw-r--r--tests/auto/client/surface/tst_surface.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/auto/client/surface/tst_surface.cpp b/tests/auto/client/surface/tst_surface.cpp
index 9659235a..b8a65f15 100644
--- a/tests/auto/client/surface/tst_surface.cpp
+++ b/tests/auto/client/surface/tst_surface.cpp
@@ -45,6 +45,10 @@ private slots:
void waitForFrameCallbackGl();
#endif
void negotiateShmFormat();
+
+ // Subsurfaces
+ void createSubsurface();
+ void createSubsurfaceForHiddenParent();
};
void tst_surface::createDestroySurface()
@@ -160,5 +164,42 @@ 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());
+}
+
+// Used to cause a crash in libwayland (QTBUG-79674)
+void tst_surface::createSubsurfaceForHiddenParent()
+{
+ QRasterWindow window;
+ window.resize(64, 64);
+ window.show();
+ QCOMPOSITOR_TRY_VERIFY(xdgToplevel());
+ exec([=] { xdgToplevel()->sendCompleteConfigure(); });
+ QCOMPOSITOR_TRY_VERIFY(xdgSurface()->m_committedConfigureSerial);
+
+ window.hide();
+
+ QRasterWindow subWindow;
+ subWindow.setParent(&window);
+ subWindow.resize(64, 64);
+ subWindow.show();
+
+ // Make sure the client doesn't quit before it has a chance to crash
+ xdgPingAndWaitForPong();
+}
+
QCOMPOSITOR_TEST_MAIN(tst_surface)
#include "tst_surface.moc"