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