Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/xwayland_input_test.cpp
Show All 20 Lines | |||||
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 "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 "shell_client.h" | 29 | #include "xdgshellclient.h" | ||
30 | 30 | | |||
31 | #include <KWayland/Server/seat_interface.h> | 31 | #include <KWayland/Server/seat_interface.h> | ||
32 | 32 | | |||
33 | #include <QSocketNotifier> | 33 | #include <QSocketNotifier> | ||
34 | 34 | | |||
35 | #include <netwm.h> | 35 | #include <netwm.h> | ||
36 | #include <xcb/xcb_icccm.h> | 36 | #include <xcb/xcb_icccm.h> | ||
37 | 37 | | |||
38 | namespace KWin | 38 | namespace KWin | ||
39 | { | 39 | { | ||
40 | 40 | | |||
41 | static const QString s_socketName = QStringLiteral("wayland_test_kwin_xwayland_input-0"); | 41 | static const QString s_socketName = QStringLiteral("wayland_test_kwin_xwayland_input-0"); | ||
42 | 42 | | |||
43 | class XWaylandInputTest : public QObject | 43 | class XWaylandInputTest : public QObject | ||
44 | { | 44 | { | ||
45 | Q_OBJECT | 45 | Q_OBJECT | ||
46 | private Q_SLOTS: | 46 | private Q_SLOTS: | ||
47 | void initTestCase(); | 47 | void initTestCase(); | ||
48 | void init(); | 48 | void init(); | ||
49 | void testPointerEnterLeave(); | 49 | void testPointerEnterLeave(); | ||
50 | }; | 50 | }; | ||
51 | 51 | | |||
52 | void XWaylandInputTest::initTestCase() | 52 | void XWaylandInputTest::initTestCase() | ||
53 | { | 53 | { | ||
54 | qRegisterMetaType<KWin::ShellClient*>(); | 54 | qRegisterMetaType<KWin::XdgShellClient *>(); | ||
55 | qRegisterMetaType<KWin::AbstractClient*>(); | 55 | qRegisterMetaType<KWin::AbstractClient*>(); | ||
56 | qRegisterMetaType<KWin::Deleted*>(); | 56 | qRegisterMetaType<KWin::Deleted*>(); | ||
57 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | 57 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | ||
58 | QVERIFY(workspaceCreatedSpy.isValid()); | 58 | QVERIFY(workspaceCreatedSpy.isValid()); | ||
59 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | 59 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | ||
60 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | 60 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | ||
61 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | 61 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | ||
62 | 62 | | |||
▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines |