Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/window_rules_test.cpp
Show All 22 Lines | |||||
23 | #include "x11client.h" | 23 | #include "x11client.h" | ||
24 | #include "cursor.h" | 24 | #include "cursor.h" | ||
25 | #include "deleted.h" | 25 | #include "deleted.h" | ||
26 | #include "screenedge.h" | 26 | #include "screenedge.h" | ||
27 | #include "screens.h" | 27 | #include "screens.h" | ||
28 | #include "rules.h" | 28 | #include "rules.h" | ||
29 | #include "wayland_server.h" | 29 | #include "wayland_server.h" | ||
30 | #include "workspace.h" | 30 | #include "workspace.h" | ||
31 | #include "xdgshellclient.h" | | |||
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_window_rules-0"); | 38 | static const QString s_socketName = QStringLiteral("wayland_test_kwin_window_rules-0"); | ||
40 | 39 | | |||
41 | class WindowRuleTest : public QObject | 40 | class WindowRuleTest : 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 cleanup(); | 46 | void cleanup(); | ||
48 | void testApplyInitialMaximizeVert_data(); | 47 | void testApplyInitialMaximizeVert_data(); | ||
49 | void testApplyInitialMaximizeVert(); | 48 | void testApplyInitialMaximizeVert(); | ||
50 | void testWindowClassChange(); | 49 | void testWindowClassChange(); | ||
51 | }; | 50 | }; | ||
52 | 51 | | |||
53 | void WindowRuleTest::initTestCase() | 52 | void WindowRuleTest::initTestCase() | ||
54 | { | 53 | { | ||
55 | qRegisterMetaType<KWin::XdgShellClient *>(); | | |||
56 | qRegisterMetaType<KWin::AbstractClient*>(); | 54 | qRegisterMetaType<KWin::AbstractClient*>(); | ||
57 | qRegisterMetaType<KWin::Deleted*>(); | 55 | qRegisterMetaType<KWin::Deleted*>(); | ||
58 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | 56 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | ||
59 | QVERIFY(workspaceCreatedSpy.isValid()); | 57 | QVERIFY(workspaceCreatedSpy.isValid()); | ||
60 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | 58 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | ||
61 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | 59 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | ||
62 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | 60 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | ||
63 | 61 | | |||
▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines |