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