From 0f60cc68a95ee6d94b79dff4285d95b0447edf7b Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 12 May 2021 21:07:08 +0300 Subject: [PATCH] autotests: Prefer stackingOrder() over xStackingOrder() This reduces the number of usages of xStackingOrder(), which simplifies the reasoning about when it can be marked as dirty. Since internal windows are now in the regular stack, InternalWindowTest can use stackingOrder(). As for X11ClientTest, there's no specific reason why it uses the x stack instead of the regular one. --- autotests/integration/internal_window.cpp | 2 +- autotests/integration/x11_client_test.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/autotests/integration/internal_window.cpp b/autotests/integration/internal_window.cpp index b8c59f38b3..4924e7222e 100644 --- a/autotests/integration/internal_window.cpp +++ b/autotests/integration/internal_window.cpp @@ -223,7 +223,7 @@ void InternalWindowTest::testEnterLeave() QCOMPARE(workspace()->findInternal(&win), c); QCOMPARE(c->frameGeometry(), QRect(0, 0, 100, 100)); QVERIFY(c->isShown(false)); - QVERIFY(workspace()->xStackingOrder().contains(c)); + QVERIFY(workspace()->stackingOrder().contains(c)); QSignalSpy enterSpy(&win, &HelperWindow::entered); QVERIFY(enterSpy.isValid()); diff --git a/autotests/integration/x11_client_test.cpp b/autotests/integration/x11_client_test.cpp index 525b1829e0..e072d13f99 100644 --- a/autotests/integration/x11_client_test.cpp +++ b/autotests/integration/x11_client_test.cpp @@ -569,7 +569,7 @@ void X11ClientTest::testFullscreenLayerWithActiveWaylandWindow() QVERIFY(waylandClient->isActive()); QCOMPARE(waylandClient->layer(), NormalLayer); QCOMPARE(workspace()->stackingOrder().last(), waylandClient); - QCOMPARE(workspace()->xStackingOrder().last(), waylandClient); + QCOMPARE(workspace()->stackingOrder().last(), waylandClient); QCOMPARE(client->layer(), NormalLayer); // now activate fullscreen again @@ -577,13 +577,13 @@ void X11ClientTest::testFullscreenLayerWithActiveWaylandWindow() QTRY_VERIFY(client->isActive()); QCOMPARE(client->layer(), ActiveLayer); QCOMPARE(workspace()->stackingOrder().last(), client); - QCOMPARE(workspace()->xStackingOrder().last(), client); + QCOMPARE(workspace()->stackingOrder().last(), client); // activate wayland window again workspace()->activateClient(waylandClient); QTRY_VERIFY(waylandClient->isActive()); QCOMPARE(workspace()->stackingOrder().last(), waylandClient); - QCOMPARE(workspace()->xStackingOrder().last(), waylandClient); + QCOMPARE(workspace()->stackingOrder().last(), waylandClient); // back to x window workspace()->activateClient(client); @@ -596,13 +596,13 @@ void X11ClientTest::testFullscreenLayerWithActiveWaylandWindow() workspace()->slotWindowFullScreen(); QVERIFY(client->isFullScreen()); QCOMPARE(workspace()->stackingOrder().last(), client); - QCOMPARE(workspace()->xStackingOrder().last(), client); + QCOMPARE(workspace()->stackingOrder().last(), client); // activate wayland window again workspace()->activateClient(waylandClient); QTRY_VERIFY(waylandClient->isActive()); QCOMPARE(workspace()->stackingOrder().last(), waylandClient); - QCOMPARE(workspace()->xStackingOrder().last(), waylandClient); + QCOMPARE(workspace()->stackingOrder().last(), waylandClient); // back to X11 window workspace()->activateClient(client); @@ -619,13 +619,13 @@ void X11ClientTest::testFullscreenLayerWithActiveWaylandWindow() xcb_flush(c.data()); QTRY_VERIFY(client->isFullScreen()); QCOMPARE(workspace()->stackingOrder().last(), client); - QCOMPARE(workspace()->xStackingOrder().last(), client); + QCOMPARE(workspace()->stackingOrder().last(), client); // activate wayland window again workspace()->activateClient(waylandClient); QTRY_VERIFY(waylandClient->isActive()); QCOMPARE(workspace()->stackingOrder().last(), waylandClient); - QCOMPARE(workspace()->xStackingOrder().last(), waylandClient); + QCOMPARE(workspace()->stackingOrder().last(), waylandClient); QCOMPARE(client->layer(), NormalLayer); // close the window