Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/screenedge_client_show_test.cpp
Show All 20 Lines | |||||
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 "deleted.h" | 24 | #include "deleted.h" | ||
25 | #include "screenedge.h" | 25 | #include "screenedge.h" | ||
26 | #include "screens.h" | 26 | #include "screens.h" | ||
27 | #include "wayland_server.h" | 27 | #include "wayland_server.h" | ||
28 | #include "workspace.h" | 28 | #include "workspace.h" | ||
29 | #include "xdgshellclient.h" | | |||
30 | #include <kwineffects.h> | 29 | #include <kwineffects.h> | ||
31 | 30 | | |||
32 | #include <netwm.h> | 31 | #include <netwm.h> | ||
33 | #include <xcb/xcb_icccm.h> | 32 | #include <xcb/xcb_icccm.h> | ||
34 | 33 | | |||
35 | namespace KWin | 34 | namespace KWin | ||
36 | { | 35 | { | ||
37 | 36 | | |||
38 | static const QString s_socketName = QStringLiteral("wayland_test_kwin_screenedge_client_show-0"); | 37 | static const QString s_socketName = QStringLiteral("wayland_test_kwin_screenedge_client_show-0"); | ||
39 | 38 | | |||
40 | class ScreenEdgeClientShowTest : public QObject | 39 | class ScreenEdgeClientShowTest : public QObject | ||
41 | { | 40 | { | ||
42 | Q_OBJECT | 41 | Q_OBJECT | ||
43 | private Q_SLOTS: | 42 | private Q_SLOTS: | ||
44 | void initTestCase(); | 43 | void initTestCase(); | ||
45 | void init(); | 44 | void init(); | ||
46 | void testScreenEdgeShowHideX11_data(); | 45 | void testScreenEdgeShowHideX11_data(); | ||
47 | void testScreenEdgeShowHideX11(); | 46 | void testScreenEdgeShowHideX11(); | ||
48 | void testScreenEdgeShowX11Touch_data(); | 47 | void testScreenEdgeShowX11Touch_data(); | ||
49 | void testScreenEdgeShowX11Touch(); | 48 | void testScreenEdgeShowX11Touch(); | ||
50 | }; | 49 | }; | ||
51 | 50 | | |||
52 | void ScreenEdgeClientShowTest::initTestCase() | 51 | void ScreenEdgeClientShowTest::initTestCase() | ||
53 | { | 52 | { | ||
54 | qRegisterMetaType<KWin::XdgShellClient *>(); | | |||
55 | qRegisterMetaType<KWin::AbstractClient*>(); | 53 | qRegisterMetaType<KWin::AbstractClient*>(); | ||
56 | qRegisterMetaType<KWin::Deleted*>(); | 54 | qRegisterMetaType<KWin::Deleted*>(); | ||
57 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | 55 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | ||
58 | QVERIFY(workspaceCreatedSpy.isValid()); | 56 | QVERIFY(workspaceCreatedSpy.isValid()); | ||
59 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | 57 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | ||
60 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | 58 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | ||
61 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | 59 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | ||
62 | 60 | | |||
▲ Show 20 Lines • Show All 234 Lines • Show Last 20 Lines |