Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/stacking_order_test.cpp
Show All 25 Lines | |||||
26 | #include "deleted.h" | 26 | #include "deleted.h" | ||
27 | #include "main.h" | 27 | #include "main.h" | ||
28 | #include "platform.h" | 28 | #include "platform.h" | ||
29 | #include "shell_client.h" | 29 | #include "shell_client.h" | ||
30 | #include "wayland_server.h" | 30 | #include "wayland_server.h" | ||
31 | #include "workspace.h" | 31 | #include "workspace.h" | ||
32 | 32 | | |||
33 | #include <KWayland/Client/compositor.h> | 33 | #include <KWayland/Client/compositor.h> | ||
34 | #include <KWayland/Client/shell.h> | | |||
35 | #include <KWayland/Client/surface.h> | 34 | #include <KWayland/Client/surface.h> | ||
36 | 35 | | |||
37 | #include <xcb/xcb.h> | 36 | #include <xcb/xcb.h> | ||
38 | #include <xcb/xcb_icccm.h> | 37 | #include <xcb/xcb_icccm.h> | ||
39 | 38 | | |||
40 | using namespace KWin; | 39 | using namespace KWin; | ||
41 | 40 | | |||
42 | static const QString s_socketName = QStringLiteral("wayland_test_kwin_stacking_order-0"); | 41 | static const QString s_socketName = QStringLiteral("wayland_test_kwin_stacking_order-0"); | ||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | |||||
95 | void StackingOrderTest::testTransientIsAboveParent() | 94 | void StackingOrderTest::testTransientIsAboveParent() | ||
96 | { | 95 | { | ||
97 | // This test verifies that transients are always above their parents. | 96 | // This test verifies that transients are always above their parents. | ||
98 | 97 | | |||
99 | // Create the parent. | 98 | // Create the parent. | ||
100 | KWayland::Client::Surface *parentSurface = | 99 | KWayland::Client::Surface *parentSurface = | ||
101 | Test::createSurface(Test::waylandCompositor()); | 100 | Test::createSurface(Test::waylandCompositor()); | ||
102 | QVERIFY(parentSurface); | 101 | QVERIFY(parentSurface); | ||
103 | KWayland::Client::ShellSurface *parentShellSurface = | 102 | KWayland::Client::XdgShellSurface *parentShellSurface = | ||
104 | Test::createShellSurface(parentSurface, parentSurface); | 103 | Test::createXdgShellStableSurface(parentSurface, parentSurface); | ||
105 | QVERIFY(parentShellSurface); | 104 | QVERIFY(parentShellSurface); | ||
106 | ShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue); | 105 | ShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue); | ||
107 | QVERIFY(parent); | 106 | QVERIFY(parent); | ||
108 | QVERIFY(parent->isActive()); | 107 | QVERIFY(parent->isActive()); | ||
109 | QVERIFY(!parent->isTransient()); | 108 | QVERIFY(!parent->isTransient()); | ||
110 | 109 | | |||
111 | // Initially, the stacking order should contain only the parent window. | 110 | // Initially, the stacking order should contain only the parent window. | ||
112 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent})); | 111 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent})); | ||
113 | 112 | | |||
114 | // Create the transient. | 113 | // Create the transient. | ||
115 | KWayland::Client::Surface *transientSurface = | 114 | KWayland::Client::Surface *transientSurface = | ||
116 | Test::createSurface(Test::waylandCompositor()); | 115 | Test::createSurface(Test::waylandCompositor()); | ||
117 | QVERIFY(transientSurface); | 116 | QVERIFY(transientSurface); | ||
118 | KWayland::Client::ShellSurface *transientShellSurface = | 117 | KWayland::Client::XdgShellSurface *transientShellSurface = | ||
119 | Test::createShellSurface(transientSurface, transientSurface); | 118 | Test::createXdgShellStableSurface(transientSurface, transientSurface); | ||
120 | QVERIFY(transientShellSurface); | 119 | QVERIFY(transientShellSurface); | ||
121 | transientShellSurface->setTransient(parentSurface, QPoint(0, 0)); | 120 | transientShellSurface->setTransientFor(parentShellSurface); | ||
122 | ShellClient *transient = Test::renderAndWaitForShown( | 121 | ShellClient *transient = Test::renderAndWaitForShown( | ||
123 | transientSurface, QSize(128, 128), Qt::red); | 122 | transientSurface, QSize(128, 128), Qt::red); | ||
124 | QVERIFY(transient); | 123 | QVERIFY(transient); | ||
125 | QVERIFY(transient->isActive()); | 124 | QVERIFY(transient->isActive()); | ||
126 | QVERIFY(transient->isTransient()); | 125 | QVERIFY(transient->isTransient()); | ||
127 | 126 | | |||
128 | // The transient should be above the parent. | 127 | // The transient should be above the parent. | ||
129 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent, transient})); | 128 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent, transient})); | ||
Show All 9 Lines | |||||
139 | { | 138 | { | ||
140 | // This test verifies that both the parent and the transient will be | 139 | // This test verifies that both the parent and the transient will be | ||
141 | // raised if either one of them is activated. | 140 | // raised if either one of them is activated. | ||
142 | 141 | | |||
143 | // Create the parent. | 142 | // Create the parent. | ||
144 | KWayland::Client::Surface *parentSurface = | 143 | KWayland::Client::Surface *parentSurface = | ||
145 | Test::createSurface(Test::waylandCompositor()); | 144 | Test::createSurface(Test::waylandCompositor()); | ||
146 | QVERIFY(parentSurface); | 145 | QVERIFY(parentSurface); | ||
147 | KWayland::Client::ShellSurface *parentShellSurface = | 146 | KWayland::Client::XdgShellSurface *parentShellSurface = | ||
148 | Test::createShellSurface(parentSurface, parentSurface); | 147 | Test::createXdgShellStableSurface(parentSurface, parentSurface); | ||
149 | QVERIFY(parentShellSurface); | 148 | QVERIFY(parentShellSurface); | ||
150 | ShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue); | 149 | ShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue); | ||
151 | QVERIFY(parent); | 150 | QVERIFY(parent); | ||
152 | QVERIFY(parent->isActive()); | 151 | QVERIFY(parent->isActive()); | ||
153 | QVERIFY(!parent->isTransient()); | 152 | QVERIFY(!parent->isTransient()); | ||
154 | 153 | | |||
155 | // Initially, the stacking order should contain only the parent window. | 154 | // Initially, the stacking order should contain only the parent window. | ||
156 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent})); | 155 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent})); | ||
157 | 156 | | |||
158 | // Create the transient. | 157 | // Create the transient. | ||
159 | KWayland::Client::Surface *transientSurface = | 158 | KWayland::Client::Surface *transientSurface = | ||
160 | Test::createSurface(Test::waylandCompositor()); | 159 | Test::createSurface(Test::waylandCompositor()); | ||
161 | QVERIFY(transientSurface); | 160 | QVERIFY(transientSurface); | ||
162 | KWayland::Client::ShellSurface *transientShellSurface = | 161 | KWayland::Client::XdgShellSurface *transientShellSurface = | ||
163 | Test::createShellSurface(transientSurface, transientSurface); | 162 | Test::createXdgShellStableSurface(transientSurface, transientSurface); | ||
164 | QVERIFY(transientShellSurface); | 163 | QVERIFY(transientShellSurface); | ||
165 | transientShellSurface->setTransient(parentSurface, QPoint(0, 0)); | 164 | transientShellSurface->setTransientFor(parentShellSurface); | ||
166 | ShellClient *transient = Test::renderAndWaitForShown( | 165 | ShellClient *transient = Test::renderAndWaitForShown( | ||
167 | transientSurface, QSize(128, 128), Qt::red); | 166 | transientSurface, QSize(128, 128), Qt::red); | ||
168 | QVERIFY(transient); | 167 | QVERIFY(transient); | ||
169 | QTRY_VERIFY(transient->isActive()); | 168 | QTRY_VERIFY(transient->isActive()); | ||
170 | QVERIFY(transient->isTransient()); | 169 | QVERIFY(transient->isTransient()); | ||
171 | 170 | | |||
172 | // The transient should be above the parent. | 171 | // The transient should be above the parent. | ||
173 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent, transient})); | 172 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent, transient})); | ||
174 | 173 | | |||
175 | // Create a window that doesn't have any relationship to the parent or the transient. | 174 | // Create a window that doesn't have any relationship to the parent or the transient. | ||
176 | KWayland::Client::Surface *anotherSurface = | 175 | KWayland::Client::Surface *anotherSurface = | ||
177 | Test::createSurface(Test::waylandCompositor()); | 176 | Test::createSurface(Test::waylandCompositor()); | ||
178 | QVERIFY(anotherSurface); | 177 | QVERIFY(anotherSurface); | ||
179 | KWayland::Client::ShellSurface *anotherShellSurface = | 178 | KWayland::Client::XdgShellSurface *anotherShellSurface = | ||
180 | Test::createShellSurface(anotherSurface, anotherSurface); | 179 | Test::createXdgShellStableSurface(anotherSurface, anotherSurface); | ||
181 | QVERIFY(anotherShellSurface); | 180 | QVERIFY(anotherShellSurface); | ||
182 | ShellClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green); | 181 | ShellClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green); | ||
183 | QVERIFY(anotherClient); | 182 | QVERIFY(anotherClient); | ||
184 | QVERIFY(anotherClient->isActive()); | 183 | QVERIFY(anotherClient->isActive()); | ||
185 | QVERIFY(!anotherClient->isTransient()); | 184 | QVERIFY(!anotherClient->isTransient()); | ||
186 | 185 | | |||
187 | // The newly created surface has to be above both the parent and the transient. | 186 | // The newly created surface has to be above both the parent and the transient. | ||
188 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent, transient, anotherClient})); | 187 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent, transient, anotherClient})); | ||
Show All 33 Lines | |||||
222 | { | 221 | { | ||
223 | // This test verifies that deleted transients are kept above their | 222 | // This test verifies that deleted transients are kept above their | ||
224 | // old parents. | 223 | // old parents. | ||
225 | 224 | | |||
226 | // Create the parent. | 225 | // Create the parent. | ||
227 | KWayland::Client::Surface *parentSurface = | 226 | KWayland::Client::Surface *parentSurface = | ||
228 | Test::createSurface(Test::waylandCompositor()); | 227 | Test::createSurface(Test::waylandCompositor()); | ||
229 | QVERIFY(parentSurface); | 228 | QVERIFY(parentSurface); | ||
230 | KWayland::Client::ShellSurface *parentShellSurface = | 229 | KWayland::Client::XdgShellSurface *parentShellSurface = | ||
231 | Test::createShellSurface(parentSurface, parentSurface); | 230 | Test::createXdgShellStableSurface(parentSurface, parentSurface); | ||
232 | QVERIFY(parentShellSurface); | 231 | QVERIFY(parentShellSurface); | ||
233 | ShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue); | 232 | ShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue); | ||
234 | QVERIFY(parent); | 233 | QVERIFY(parent); | ||
235 | QVERIFY(parent->isActive()); | 234 | QVERIFY(parent->isActive()); | ||
236 | QVERIFY(!parent->isTransient()); | 235 | QVERIFY(!parent->isTransient()); | ||
237 | 236 | | |||
238 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent})); | 237 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent})); | ||
239 | 238 | | |||
240 | // Create the first transient. | 239 | // Create the first transient. | ||
241 | KWayland::Client::Surface *transient1Surface = | 240 | KWayland::Client::Surface *transient1Surface = | ||
242 | Test::createSurface(Test::waylandCompositor()); | 241 | Test::createSurface(Test::waylandCompositor()); | ||
243 | QVERIFY(transient1Surface); | 242 | QVERIFY(transient1Surface); | ||
244 | KWayland::Client::ShellSurface *transient1ShellSurface = | 243 | KWayland::Client::XdgShellSurface *transient1ShellSurface = | ||
245 | Test::createShellSurface(transient1Surface, transient1Surface); | 244 | Test::createXdgShellStableSurface(transient1Surface, transient1Surface); | ||
246 | QVERIFY(transient1ShellSurface); | 245 | QVERIFY(transient1ShellSurface); | ||
247 | transient1ShellSurface->setTransient(parentSurface, QPoint(0, 0)); | 246 | transient1ShellSurface->setTransientFor(parentShellSurface); | ||
248 | ShellClient *transient1 = Test::renderAndWaitForShown( | 247 | ShellClient *transient1 = Test::renderAndWaitForShown( | ||
249 | transient1Surface, QSize(128, 128), Qt::red); | 248 | transient1Surface, QSize(128, 128), Qt::red); | ||
250 | QVERIFY(transient1); | 249 | QVERIFY(transient1); | ||
251 | QTRY_VERIFY(transient1->isActive()); | 250 | QTRY_VERIFY(transient1->isActive()); | ||
252 | QVERIFY(transient1->isTransient()); | 251 | QVERIFY(transient1->isTransient()); | ||
253 | QCOMPARE(transient1->transientFor(), parent); | 252 | QCOMPARE(transient1->transientFor(), parent); | ||
254 | 253 | | |||
255 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent, transient1})); | 254 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent, transient1})); | ||
256 | 255 | | |||
257 | // Create the second transient. | 256 | // Create the second transient. | ||
258 | KWayland::Client::Surface *transient2Surface = | 257 | KWayland::Client::Surface *transient2Surface = | ||
259 | Test::createSurface(Test::waylandCompositor()); | 258 | Test::createSurface(Test::waylandCompositor()); | ||
260 | QVERIFY(transient2Surface); | 259 | QVERIFY(transient2Surface); | ||
261 | KWayland::Client::ShellSurface *transient2ShellSurface = | 260 | KWayland::Client::XdgShellSurface *transient2ShellSurface = | ||
262 | Test::createShellSurface(transient2Surface, transient2Surface); | 261 | Test::createXdgShellStableSurface(transient2Surface, transient2Surface); | ||
263 | QVERIFY(transient2ShellSurface); | 262 | QVERIFY(transient2ShellSurface); | ||
264 | transient2ShellSurface->setTransient(transient1Surface, QPoint(0, 0)); | 263 | transient2ShellSurface->setTransientFor(transient1ShellSurface); | ||
265 | ShellClient *transient2 = Test::renderAndWaitForShown( | 264 | ShellClient *transient2 = Test::renderAndWaitForShown( | ||
266 | transient2Surface, QSize(128, 128), Qt::red); | 265 | transient2Surface, QSize(128, 128), Qt::red); | ||
267 | QVERIFY(transient2); | 266 | QVERIFY(transient2); | ||
268 | QTRY_VERIFY(transient2->isActive()); | 267 | QTRY_VERIFY(transient2->isActive()); | ||
269 | QVERIFY(transient2->isTransient()); | 268 | QVERIFY(transient2->isTransient()); | ||
270 | QCOMPARE(transient2->transientFor(), transient1); | 269 | QCOMPARE(transient2->transientFor(), transient1); | ||
271 | 270 | | |||
272 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent, transient1, transient2})); | 271 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{parent, transient1, transient2})); | ||
▲ Show 20 Lines • Show All 291 Lines • ▼ Show 20 Line(s) | 472 | { | |||
564 | QVERIFY(!transient->isDialog()); // See above why | 563 | QVERIFY(!transient->isDialog()); // See above why | ||
565 | 564 | | |||
566 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{leader, member1, member2, transient})); | 565 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{leader, member1, member2, transient})); | ||
567 | 566 | | |||
568 | // Create a Wayland client that is not a member of the window group. | 567 | // Create a Wayland client that is not a member of the window group. | ||
569 | KWayland::Client::Surface *anotherSurface = | 568 | KWayland::Client::Surface *anotherSurface = | ||
570 | Test::createSurface(Test::waylandCompositor()); | 569 | Test::createSurface(Test::waylandCompositor()); | ||
571 | QVERIFY(anotherSurface); | 570 | QVERIFY(anotherSurface); | ||
572 | KWayland::Client::ShellSurface *anotherShellSurface = | 571 | KWayland::Client::XdgShellSurface *anotherShellSurface = | ||
573 | Test::createShellSurface(anotherSurface, anotherSurface); | 572 | Test::createXdgShellStableSurface(anotherSurface, anotherSurface); | ||
574 | QVERIFY(anotherShellSurface); | 573 | QVERIFY(anotherShellSurface); | ||
575 | ShellClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green); | 574 | ShellClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green); | ||
576 | QVERIFY(anotherClient); | 575 | QVERIFY(anotherClient); | ||
577 | QVERIFY(anotherClient->isActive()); | 576 | QVERIFY(anotherClient->isActive()); | ||
578 | QVERIFY(!anotherClient->isTransient()); | 577 | QVERIFY(!anotherClient->isTransient()); | ||
579 | 578 | | |||
580 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{leader, member1, member2, transient, anotherClient})); | 579 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{leader, member1, member2, transient, anotherClient})); | ||
581 | 580 | | |||
▲ Show 20 Lines • Show All 237 Lines • ▼ Show 20 Line(s) | |||||
819 | void StackingOrderTest::testKeepAbove() | 818 | void StackingOrderTest::testKeepAbove() | ||
820 | { | 819 | { | ||
821 | // This test verifies that "keep-above" windows are kept above other windows. | 820 | // This test verifies that "keep-above" windows are kept above other windows. | ||
822 | 821 | | |||
823 | // Create the first client. | 822 | // Create the first client. | ||
824 | KWayland::Client::Surface *clientASurface = | 823 | KWayland::Client::Surface *clientASurface = | ||
825 | Test::createSurface(Test::waylandCompositor()); | 824 | Test::createSurface(Test::waylandCompositor()); | ||
826 | QVERIFY(clientASurface); | 825 | QVERIFY(clientASurface); | ||
827 | KWayland::Client::ShellSurface *clientAShellSurface = | 826 | KWayland::Client::XdgShellSurface *clientAShellSurface = | ||
828 | Test::createShellSurface(clientASurface, clientASurface); | 827 | Test::createXdgShellStableSurface(clientASurface, clientASurface); | ||
829 | QVERIFY(clientAShellSurface); | 828 | QVERIFY(clientAShellSurface); | ||
830 | ShellClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green); | 829 | ShellClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green); | ||
831 | QVERIFY(clientA); | 830 | QVERIFY(clientA); | ||
832 | QVERIFY(clientA->isActive()); | 831 | QVERIFY(clientA->isActive()); | ||
833 | QVERIFY(!clientA->keepAbove()); | 832 | QVERIFY(!clientA->keepAbove()); | ||
834 | 833 | | |||
835 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{clientA})); | 834 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{clientA})); | ||
836 | 835 | | |||
837 | // Create the second client. | 836 | // Create the second client. | ||
838 | KWayland::Client::Surface *clientBSurface = | 837 | KWayland::Client::Surface *clientBSurface = | ||
839 | Test::createSurface(Test::waylandCompositor()); | 838 | Test::createSurface(Test::waylandCompositor()); | ||
840 | QVERIFY(clientBSurface); | 839 | QVERIFY(clientBSurface); | ||
841 | KWayland::Client::ShellSurface *clientBShellSurface = | 840 | KWayland::Client::XdgShellSurface *clientBShellSurface = | ||
842 | Test::createShellSurface(clientBSurface, clientBSurface); | 841 | Test::createXdgShellStableSurface(clientBSurface, clientBSurface); | ||
843 | QVERIFY(clientBShellSurface); | 842 | QVERIFY(clientBShellSurface); | ||
844 | ShellClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green); | 843 | ShellClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green); | ||
845 | QVERIFY(clientB); | 844 | QVERIFY(clientB); | ||
846 | QVERIFY(clientB->isActive()); | 845 | QVERIFY(clientB->isActive()); | ||
847 | QVERIFY(!clientB->keepAbove()); | 846 | QVERIFY(!clientB->keepAbove()); | ||
848 | 847 | | |||
849 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{clientA, clientB})); | 848 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{clientA, clientB})); | ||
850 | 849 | | |||
Show All 16 Lines | |||||
867 | void StackingOrderTest::testKeepBelow() | 866 | void StackingOrderTest::testKeepBelow() | ||
868 | { | 867 | { | ||
869 | // This test verifies that "keep-below" windows are kept below other windows. | 868 | // This test verifies that "keep-below" windows are kept below other windows. | ||
870 | 869 | | |||
871 | // Create the first client. | 870 | // Create the first client. | ||
872 | KWayland::Client::Surface *clientASurface = | 871 | KWayland::Client::Surface *clientASurface = | ||
873 | Test::createSurface(Test::waylandCompositor()); | 872 | Test::createSurface(Test::waylandCompositor()); | ||
874 | QVERIFY(clientASurface); | 873 | QVERIFY(clientASurface); | ||
875 | KWayland::Client::ShellSurface *clientAShellSurface = | 874 | KWayland::Client::XdgShellSurface *clientAShellSurface = | ||
876 | Test::createShellSurface(clientASurface, clientASurface); | 875 | Test::createXdgShellStableSurface(clientASurface, clientASurface); | ||
877 | QVERIFY(clientAShellSurface); | 876 | QVERIFY(clientAShellSurface); | ||
878 | ShellClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green); | 877 | ShellClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green); | ||
879 | QVERIFY(clientA); | 878 | QVERIFY(clientA); | ||
880 | QVERIFY(clientA->isActive()); | 879 | QVERIFY(clientA->isActive()); | ||
881 | QVERIFY(!clientA->keepBelow()); | 880 | QVERIFY(!clientA->keepBelow()); | ||
882 | 881 | | |||
883 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{clientA})); | 882 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{clientA})); | ||
884 | 883 | | |||
885 | // Create the second client. | 884 | // Create the second client. | ||
886 | KWayland::Client::Surface *clientBSurface = | 885 | KWayland::Client::Surface *clientBSurface = | ||
887 | Test::createSurface(Test::waylandCompositor()); | 886 | Test::createSurface(Test::waylandCompositor()); | ||
888 | QVERIFY(clientBSurface); | 887 | QVERIFY(clientBSurface); | ||
889 | KWayland::Client::ShellSurface *clientBShellSurface = | 888 | KWayland::Client::XdgShellSurface *clientBShellSurface = | ||
890 | Test::createShellSurface(clientBSurface, clientBSurface); | 889 | Test::createXdgShellStableSurface(clientBSurface, clientBSurface); | ||
891 | QVERIFY(clientBShellSurface); | 890 | QVERIFY(clientBShellSurface); | ||
892 | ShellClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green); | 891 | ShellClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green); | ||
893 | QVERIFY(clientB); | 892 | QVERIFY(clientB); | ||
894 | QVERIFY(clientB->isActive()); | 893 | QVERIFY(clientB->isActive()); | ||
895 | QVERIFY(!clientB->keepBelow()); | 894 | QVERIFY(!clientB->keepBelow()); | ||
896 | 895 | | |||
897 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{clientA, clientB})); | 896 | QCOMPARE(workspace()->stackingOrder(), (ToplevelList{clientA, clientB})); | ||
898 | 897 | | |||
Show All 13 Lines |