Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/scene_qpainter_test.cpp
Show First 20 Lines • Show All 277 Lines • ▼ Show 20 Line(s) | 269 | { | |||
---|---|---|---|---|---|
278 | QScopedPointer<QObject> ss(Test::createShellSurface(type, s.data())); | 278 | QScopedPointer<QObject> ss(Test::createShellSurface(type, s.data())); | ||
279 | QVERIFY(Test::renderAndWaitForShown(s.data(), QSize(200, 300), Qt::blue)); | 279 | QVERIFY(Test::renderAndWaitForShown(s.data(), QSize(200, 300), Qt::blue)); | ||
280 | 280 | | |||
281 | // now let's try to reinitialize the compositing scene | 281 | // now let's try to reinitialize the compositing scene | ||
282 | auto oldScene = KWin::Compositor::self()->scene(); | 282 | auto oldScene = KWin::Compositor::self()->scene(); | ||
283 | QVERIFY(oldScene); | 283 | QVERIFY(oldScene); | ||
284 | QSignalSpy sceneCreatedSpy(KWin::Compositor::self(), &KWin::Compositor::sceneCreated); | 284 | QSignalSpy sceneCreatedSpy(KWin::Compositor::self(), &KWin::Compositor::sceneCreated); | ||
285 | QVERIFY(sceneCreatedSpy.isValid()); | 285 | QVERIFY(sceneCreatedSpy.isValid()); | ||
286 | KWin::Compositor::self()->slotReinitialize(); | 286 | KWin::Compositor::self()->reinitialize(); | ||
287 | if (sceneCreatedSpy.isEmpty()) { | 287 | if (sceneCreatedSpy.isEmpty()) { | ||
288 | QVERIFY(sceneCreatedSpy.wait()); | 288 | QVERIFY(sceneCreatedSpy.wait()); | ||
289 | } | 289 | } | ||
290 | QCOMPARE(sceneCreatedSpy.count(), 1); | 290 | QCOMPARE(sceneCreatedSpy.count(), 1); | ||
291 | auto scene = KWin::Compositor::self()->scene(); | 291 | auto scene = KWin::Compositor::self()->scene(); | ||
292 | QVERIFY(scene); | 292 | QVERIFY(scene); | ||
293 | 293 | | |||
294 | // this should directly trigger a frame | 294 | // this should directly trigger a frame | ||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |