Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/effects/slidingpopups_test.cpp
Show All 12 Lines | |||||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. | ||
16 | 16 | | |||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #include "kwin_wayland_test.h" | 20 | #include "kwin_wayland_test.h" | ||
21 | #include "client.h" | 21 | #include "x11client.h" | ||
22 | #include "composite.h" | 22 | #include "composite.h" | ||
23 | #include "deleted.h" | 23 | #include "deleted.h" | ||
24 | #include "effects.h" | 24 | #include "effects.h" | ||
25 | #include "effectloader.h" | 25 | #include "effectloader.h" | ||
26 | #include "cursor.h" | 26 | #include "cursor.h" | ||
27 | #include "platform.h" | 27 | #include "platform.h" | ||
28 | #include "scene.h" | 28 | #include "scene.h" | ||
29 | #include "xdgshellclient.h" | 29 | #include "xdgshellclient.h" | ||
▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Line(s) | 145 | { | |||
214 | 214 | | |||
215 | xcb_map_window(c.data(), w); | 215 | xcb_map_window(c.data(), w); | ||
216 | xcb_flush(c.data()); | 216 | xcb_flush(c.data()); | ||
217 | 217 | | |||
218 | // we should get a client for it | 218 | // we should get a client for it | ||
219 | QSignalSpy windowCreatedSpy(workspace(), &Workspace::clientAdded); | 219 | QSignalSpy windowCreatedSpy(workspace(), &Workspace::clientAdded); | ||
220 | QVERIFY(windowCreatedSpy.isValid()); | 220 | QVERIFY(windowCreatedSpy.isValid()); | ||
221 | QVERIFY(windowCreatedSpy.wait()); | 221 | QVERIFY(windowCreatedSpy.wait()); | ||
222 | Client *client = windowCreatedSpy.first().first().value<Client*>(); | 222 | X11Client *client = windowCreatedSpy.first().first().value<X11Client *>(); | ||
223 | QVERIFY(client); | 223 | QVERIFY(client); | ||
224 | QCOMPARE(client->window(), w); | 224 | QCOMPARE(client->window(), w); | ||
225 | QVERIFY(client->isNormalWindow()); | 225 | QVERIFY(client->isNormalWindow()); | ||
226 | 226 | | |||
227 | // sliding popups should be active | 227 | // sliding popups should be active | ||
228 | QVERIFY(windowAddedSpy.wait()); | 228 | QVERIFY(windowAddedSpy.wait()); | ||
229 | QTRY_VERIFY(slidingPoupus->isActive()); | 229 | QTRY_VERIFY(slidingPoupus->isActive()); | ||
230 | QVERIFY(!otherEffect->isActive()); | 230 | QVERIFY(!otherEffect->isActive()); | ||
231 | 231 | | |||
232 | // wait till effect ends | 232 | // wait till effect ends | ||
233 | QTRY_VERIFY(!slidingPoupus->isActive()); | 233 | QTRY_VERIFY(!slidingPoupus->isActive()); | ||
234 | QTest::qWait(300); | 234 | QTest::qWait(300); | ||
235 | QVERIFY(!otherEffect->isActive()); | 235 | QVERIFY(!otherEffect->isActive()); | ||
236 | 236 | | |||
237 | // and destroy the window again | 237 | // and destroy the window again | ||
238 | xcb_unmap_window(c.data(), w); | 238 | xcb_unmap_window(c.data(), w); | ||
239 | xcb_flush(c.data()); | 239 | xcb_flush(c.data()); | ||
240 | 240 | | |||
241 | QSignalSpy windowClosedSpy(client, &Client::windowClosed); | 241 | QSignalSpy windowClosedSpy(client, &X11Client::windowClosed); | ||
242 | QVERIFY(windowClosedSpy.isValid()); | 242 | QVERIFY(windowClosedSpy.isValid()); | ||
243 | 243 | | |||
244 | QSignalSpy windowDeletedSpy(effects, &EffectsHandler::windowDeleted); | 244 | QSignalSpy windowDeletedSpy(effects, &EffectsHandler::windowDeleted); | ||
245 | QVERIFY(windowDeletedSpy.isValid()); | 245 | QVERIFY(windowDeletedSpy.isValid()); | ||
246 | QVERIFY(windowClosedSpy.wait()); | 246 | QVERIFY(windowClosedSpy.wait()); | ||
247 | 247 | | |||
248 | // again we should have the sliding popups active | 248 | // again we should have the sliding popups active | ||
249 | QVERIFY(slidingPoupus->isActive()); | 249 | QVERIFY(slidingPoupus->isActive()); | ||
▲ Show 20 Lines • Show All 102 Lines • ▼ Show 20 Line(s) | 282 | { | |||
352 | QTRY_VERIFY(!slidingPoupus->isActive()); | 352 | QTRY_VERIFY(!slidingPoupus->isActive()); | ||
353 | QTest::qWait(300); | 353 | QTest::qWait(300); | ||
354 | QVERIFY(!otherEffect->isActive()); | 354 | QVERIFY(!otherEffect->isActive()); | ||
355 | 355 | | |||
356 | // and destroy the window again | 356 | // and destroy the window again | ||
357 | shellSurface.reset(); | 357 | shellSurface.reset(); | ||
358 | surface.reset(); | 358 | surface.reset(); | ||
359 | 359 | | |||
360 | QSignalSpy windowClosedSpy(client, &Client::windowClosed); | 360 | QSignalSpy windowClosedSpy(client, &X11Client::windowClosed); | ||
361 | QVERIFY(windowClosedSpy.isValid()); | 361 | QVERIFY(windowClosedSpy.isValid()); | ||
362 | 362 | | |||
363 | QSignalSpy windowDeletedSpy(effects, &EffectsHandler::windowDeleted); | 363 | QSignalSpy windowDeletedSpy(effects, &EffectsHandler::windowDeleted); | ||
364 | QVERIFY(windowDeletedSpy.isValid()); | 364 | QVERIFY(windowDeletedSpy.isValid()); | ||
365 | QVERIFY(windowClosedSpy.wait()); | 365 | QVERIFY(windowClosedSpy.wait()); | ||
366 | 366 | | |||
367 | // again we should have the sliding popups active | 367 | // again we should have the sliding popups active | ||
368 | QVERIFY(slidingPoupus->isActive()); | 368 | QVERIFY(slidingPoupus->isActive()); | ||
Show All 12 Lines |