Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/dont_crash_cancel_animation.cpp
Show All 30 Lines | |||||
31 | #include "workspace.h" | 31 | #include "workspace.h" | ||
32 | #include "scripting/scriptedeffect.h" | 32 | #include "scripting/scriptedeffect.h" | ||
33 | 33 | | |||
34 | #include <KDecoration2/Decoration> | 34 | #include <KDecoration2/Decoration> | ||
35 | 35 | | |||
36 | #include <KWayland/Client/connection_thread.h> | 36 | #include <KWayland/Client/connection_thread.h> | ||
37 | #include <KWayland/Client/compositor.h> | 37 | #include <KWayland/Client/compositor.h> | ||
38 | #include <KWayland/Client/shm_pool.h> | 38 | #include <KWayland/Client/shm_pool.h> | ||
39 | #include <KWayland/Client/shell.h> | | |||
40 | #include <KWayland/Client/surface.h> | 39 | #include <KWayland/Client/surface.h> | ||
41 | 40 | | |||
42 | namespace KWin | 41 | namespace KWin | ||
43 | { | 42 | { | ||
44 | 43 | | |||
45 | static const QString s_socketName = QStringLiteral("wayland_test_kwin_dont_crash_cancel_animation-0"); | 44 | static const QString s_socketName = QStringLiteral("wayland_test_kwin_dont_crash_cancel_animation-0"); | ||
46 | 45 | | |||
47 | class DontCrashCancelAnimationFromAnimationEndedTest : public QObject | 46 | class DontCrashCancelAnimationFromAnimationEndedTest : public QObject | ||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | 88 | for (auto it = children.begin(); it != children.end(); ++it) { | |||
94 | break; | 93 | break; | ||
95 | } | 94 | } | ||
96 | QVERIFY(static_cast<EffectsHandlerImpl*>(effects)->isEffectLoaded(QStringLiteral("crashy"))); | 95 | QVERIFY(static_cast<EffectsHandlerImpl*>(effects)->isEffectLoaded(QStringLiteral("crashy"))); | ||
97 | 96 | | |||
98 | using namespace KWayland::Client; | 97 | using namespace KWayland::Client; | ||
99 | // create a window | 98 | // create a window | ||
100 | Surface *surface = Test::createSurface(Test::waylandCompositor()); | 99 | Surface *surface = Test::createSurface(Test::waylandCompositor()); | ||
101 | QVERIFY(surface); | 100 | QVERIFY(surface); | ||
102 | ShellSurface *shellSurface = Test::createShellSurface(surface, surface); | 101 | XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface); | ||
103 | QVERIFY(shellSurface); | 102 | QVERIFY(shellSurface); | ||
104 | // let's render | 103 | // let's render | ||
105 | auto c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); | 104 | auto c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); | ||
106 | QVERIFY(c); | 105 | QVERIFY(c); | ||
107 | QCOMPARE(workspace()->activeClient(), c); | 106 | QCOMPARE(workspace()->activeClient(), c); | ||
108 | 107 | | |||
109 | // make sure we animate | 108 | // make sure we animate | ||
110 | QTest::qWait(200); | 109 | QTest::qWait(200); | ||
Show All 16 Lines |