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.
remotes/origin/work/show-recording-windows
Vlad Zahorodnii 5 years ago
parent 32848490ba
commit 0f60cc68a9
  1. 2
      autotests/integration/internal_window.cpp
  2. 14
      autotests/integration/x11_client_test.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());

@ -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

Loading…
Cancel
Save