Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/shade_test.cpp
Show All 19 Lines | |||||
20 | #include "kwin_wayland_test.h" | 20 | #include "kwin_wayland_test.h" | ||
21 | #include "platform.h" | 21 | #include "platform.h" | ||
22 | #include "client.h" | 22 | #include "client.h" | ||
23 | #include "cursor.h" | 23 | #include "cursor.h" | ||
24 | #include "screenedge.h" | 24 | #include "screenedge.h" | ||
25 | #include "screens.h" | 25 | #include "screens.h" | ||
26 | #include "wayland_server.h" | 26 | #include "wayland_server.h" | ||
27 | #include "workspace.h" | 27 | #include "workspace.h" | ||
28 | #include "shell_client.h" | 28 | #include "xdgshellclient.h" | ||
29 | #include <kwineffects.h> | 29 | #include <kwineffects.h> | ||
30 | 30 | | |||
31 | #include <KDecoration2/Decoration> | 31 | #include <KDecoration2/Decoration> | ||
32 | 32 | | |||
33 | #include <netwm.h> | 33 | #include <netwm.h> | ||
34 | #include <xcb/xcb_icccm.h> | 34 | #include <xcb/xcb_icccm.h> | ||
35 | 35 | | |||
36 | namespace KWin | 36 | namespace KWin | ||
37 | { | 37 | { | ||
38 | 38 | | |||
39 | static const QString s_socketName = QStringLiteral("wayland_test_kwin_shade-0"); | 39 | static const QString s_socketName = QStringLiteral("wayland_test_kwin_shade-0"); | ||
40 | 40 | | |||
41 | class ShadeTest : public QObject | 41 | class ShadeTest : public QObject | ||
42 | { | 42 | { | ||
43 | Q_OBJECT | 43 | Q_OBJECT | ||
44 | private Q_SLOTS: | 44 | private Q_SLOTS: | ||
45 | void initTestCase(); | 45 | void initTestCase(); | ||
46 | void init(); | 46 | void init(); | ||
47 | void testShadeGeometry(); | 47 | void testShadeGeometry(); | ||
48 | }; | 48 | }; | ||
49 | 49 | | |||
50 | void ShadeTest::initTestCase() | 50 | void ShadeTest::initTestCase() | ||
51 | { | 51 | { | ||
52 | qRegisterMetaType<KWin::ShellClient*>(); | 52 | qRegisterMetaType<KWin::XdgShellClient *>(); | ||
53 | qRegisterMetaType<KWin::AbstractClient*>(); | 53 | qRegisterMetaType<KWin::AbstractClient*>(); | ||
54 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | 54 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | ||
55 | QVERIFY(workspaceCreatedSpy.isValid()); | 55 | QVERIFY(workspaceCreatedSpy.isValid()); | ||
56 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | 56 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | ||
57 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | 57 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | ||
58 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | 58 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | ||
59 | 59 | | |||
60 | kwinApp()->start(); | 60 | kwinApp()->start(); | ||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |