Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/dont_crash_empty_deco.cpp
Show All 21 Lines | |||||
22 | #include "client.h" | 22 | #include "client.h" | ||
23 | #include "composite.h" | 23 | #include "composite.h" | ||
24 | #include "cursor.h" | 24 | #include "cursor.h" | ||
25 | #include "scene.h" | 25 | #include "scene.h" | ||
26 | #include "screenedge.h" | 26 | #include "screenedge.h" | ||
27 | #include "screens.h" | 27 | #include "screens.h" | ||
28 | #include "wayland_server.h" | 28 | #include "wayland_server.h" | ||
29 | #include "workspace.h" | 29 | #include "workspace.h" | ||
30 | #include "shell_client.h" | 30 | #include "xdgshellclient.h" | ||
31 | #include <kwineffects.h> | 31 | #include <kwineffects.h> | ||
32 | 32 | | |||
33 | #include <KDecoration2/Decoration> | 33 | #include <KDecoration2/Decoration> | ||
34 | 34 | | |||
35 | #include <linux/input.h> | 35 | #include <linux/input.h> | ||
36 | 36 | | |||
37 | namespace KWin | 37 | namespace KWin | ||
38 | { | 38 | { | ||
39 | 39 | | |||
40 | static const QString s_socketName = QStringLiteral("wayland_test_kwin_dont_crash_empty_decoration-0"); | 40 | static const QString s_socketName = QStringLiteral("wayland_test_kwin_dont_crash_empty_decoration-0"); | ||
41 | 41 | | |||
42 | class DontCrashEmptyDecorationTest : public QObject | 42 | class DontCrashEmptyDecorationTest : public QObject | ||
43 | { | 43 | { | ||
44 | Q_OBJECT | 44 | Q_OBJECT | ||
45 | private Q_SLOTS: | 45 | private Q_SLOTS: | ||
46 | void initTestCase(); | 46 | void initTestCase(); | ||
47 | void init(); | 47 | void init(); | ||
48 | void testBug361551(); | 48 | void testBug361551(); | ||
49 | }; | 49 | }; | ||
50 | 50 | | |||
51 | void DontCrashEmptyDecorationTest::initTestCase() | 51 | void DontCrashEmptyDecorationTest::initTestCase() | ||
52 | { | 52 | { | ||
53 | qRegisterMetaType<KWin::ShellClient*>(); | 53 | qRegisterMetaType<KWin::XdgShellClient *>(); | ||
54 | qRegisterMetaType<KWin::AbstractClient*>(); | 54 | qRegisterMetaType<KWin::AbstractClient*>(); | ||
55 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | 55 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | ||
56 | QVERIFY(workspaceCreatedSpy.isValid()); | 56 | QVERIFY(workspaceCreatedSpy.isValid()); | ||
57 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | 57 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | ||
58 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | 58 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | ||
59 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | 59 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | ||
60 | 60 | | |||
61 | // this test needs to enforce OpenGL compositing to get into the crashy condition | 61 | // this test needs to enforce OpenGL compositing to get into the crashy condition | ||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |