Introduce started signal in Application
The new signal is emitted when the Application has fully been initialized. It allows us to change the startup sequence, for example create workspace before starting the Xwayland server, without making any adjustments in our test suit.
This commit is contained in:
parent
27ceaf9793
commit
d1b35f306d
71 changed files with 209 additions and 198 deletions
|
@ -59,14 +59,14 @@ void ActivationTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<AbstractClient *>();
|
qRegisterMetaType<AbstractClient *>();
|
||||||
|
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -59,15 +59,15 @@ void ActivitiesTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWin::Deleted*>();
|
qRegisterMetaType<KWin::Deleted*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->setUseKActivities(true);
|
kwinApp()->setUseKActivities(true);
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -47,8 +47,8 @@ private Q_SLOTS:
|
||||||
|
|
||||||
void ColorCorrectNightColorTest::initTestCase()
|
void ColorCorrectNightColorTest::initTestCase()
|
||||||
{
|
{
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
@ -56,7 +56,7 @@ void ColorCorrectNightColorTest::initTestCase()
|
||||||
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,13 +71,13 @@ void TestDbusInterface::initTestCase()
|
||||||
qRegisterMetaType<KWin::Deleted*>();
|
qRegisterMetaType<KWin::Deleted*>();
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
|
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
VirtualDesktopManager::self()->setCount(4);
|
VirtualDesktopManager::self()->setCount(4);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,14 +60,14 @@ void DebugConsoleTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient *>();
|
qRegisterMetaType<KWin::AbstractClient *>();
|
||||||
qRegisterMetaType<KWin::InternalClient *>();
|
qRegisterMetaType<KWin::InternalClient *>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -134,8 +134,8 @@ void DecorationInputTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient *>();
|
qRegisterMetaType<KWin::AbstractClient *>();
|
||||||
qRegisterMetaType<KWin::InternalClient *>();
|
qRegisterMetaType<KWin::InternalClient *>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
@ -150,7 +150,7 @@ void DecorationInputTest::initTestCase()
|
||||||
kwinApp()->setConfig(config);
|
kwinApp()->setConfig(config);
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -54,14 +54,14 @@ void X11DesktopWindowTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWin::Deleted*>();
|
qRegisterMetaType<KWin::Deleted*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -54,8 +54,8 @@ void DontCrashAuroraeDestroyDecoTest::initTestCase()
|
||||||
{
|
{
|
||||||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
@ -68,7 +68,7 @@ void DontCrashAuroraeDestroyDecoTest::initTestCase()
|
||||||
// this test needs to enforce OpenGL compositing to get into the crashy condition
|
// this test needs to enforce OpenGL compositing to get into the crashy condition
|
||||||
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -67,8 +67,8 @@ void DontCrashCursorPhysicalSizeEmpty::cleanup()
|
||||||
void DontCrashCursorPhysicalSizeEmpty::initTestCase()
|
void DontCrashCursorPhysicalSizeEmpty::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ void DontCrashCursorPhysicalSizeEmpty::initTestCase()
|
||||||
qputenv("XCURSOR_SIZE", QByteArrayLiteral("0"));
|
qputenv("XCURSOR_SIZE", QByteArrayLiteral("0"));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DontCrashCursorPhysicalSizeEmpty::testMoveCursorOverDeco_data()
|
void DontCrashCursorPhysicalSizeEmpty::testMoveCursorOverDeco_data()
|
||||||
|
|
|
@ -50,8 +50,8 @@ private Q_SLOTS:
|
||||||
void DontCrashEmptyDecorationTest::initTestCase()
|
void DontCrashEmptyDecorationTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
@ -59,7 +59,7 @@ void DontCrashEmptyDecorationTest::initTestCase()
|
||||||
// this test needs to enforce OpenGL compositing to get into the crashy condition
|
// this test needs to enforce OpenGL compositing to get into the crashy condition
|
||||||
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -44,12 +44,12 @@ private Q_SLOTS:
|
||||||
void DontCrashGlxgearsTest::initTestCase()
|
void DontCrashGlxgearsTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::Deleted*>();
|
qRegisterMetaType<KWin::Deleted*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DontCrashGlxgearsTest::testGlxgears()
|
void DontCrashGlxgearsTest::testGlxgears()
|
||||||
|
|
|
@ -56,8 +56,8 @@ private Q_SLOTS:
|
||||||
void DontCrashNoBorder::initTestCase()
|
void DontCrashNoBorder::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
@ -70,7 +70,7 @@ void DontCrashNoBorder::initTestCase()
|
||||||
// this test needs to enforce OpenGL compositing to get into the crashy condition
|
// this test needs to enforce OpenGL compositing to get into the crashy condition
|
||||||
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -59,8 +59,8 @@ void DontCrashReinitializeCompositorTest::initTestCase()
|
||||||
|
|
||||||
qRegisterMetaType<KWin::AbstractClient *>();
|
qRegisterMetaType<KWin::AbstractClient *>();
|
||||||
qRegisterMetaType<KWin::Deleted *>();
|
qRegisterMetaType<KWin::Deleted *>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
@ -79,7 +79,7 @@ void DontCrashReinitializeCompositorTest::initTestCase()
|
||||||
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1"));
|
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1"));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -57,8 +57,8 @@ private Q_SLOTS:
|
||||||
void TestDontCrashUseractionsMenu::initTestCase()
|
void TestDontCrashUseractionsMenu::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
@ -67,7 +67,7 @@ void TestDontCrashUseractionsMenu::initTestCase()
|
||||||
QVERIFY(kwinApp()->setStyle(QStringLiteral("breeze")));
|
QVERIFY(kwinApp()->setStyle(QStringLiteral("breeze")));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -56,8 +56,8 @@ void DesktopSwitchingAnimationTest::initTestCase()
|
||||||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||||
|
|
||||||
qRegisterMetaType<KWin::AbstractClient *>();
|
qRegisterMetaType<KWin::AbstractClient *>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ void DesktopSwitchingAnimationTest::initTestCase()
|
||||||
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1"));
|
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1"));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
|
|
||||||
auto scene = Compositor::self()->scene();
|
auto scene = Compositor::self()->scene();
|
||||||
|
|
|
@ -56,8 +56,8 @@ void MaximizeAnimationTest::initTestCase()
|
||||||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||||
|
|
||||||
qRegisterMetaType<KWin::AbstractClient *>();
|
qRegisterMetaType<KWin::AbstractClient *>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ void MaximizeAnimationTest::initTestCase()
|
||||||
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1"));
|
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1"));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,8 +58,8 @@ void MinimizeAnimationTest::initTestCase()
|
||||||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||||
|
|
||||||
qRegisterMetaType<KWin::AbstractClient *>();
|
qRegisterMetaType<KWin::AbstractClient *>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ void MinimizeAnimationTest::initTestCase()
|
||||||
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1"));
|
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1"));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
|
|
||||||
auto scene = Compositor::self()->scene();
|
auto scene = Compositor::self()->scene();
|
||||||
|
|
|
@ -65,8 +65,8 @@ void PopupOpenCloseAnimationTest::initTestCase()
|
||||||
qRegisterMetaType<KWin::AbstractClient *>();
|
qRegisterMetaType<KWin::AbstractClient *>();
|
||||||
qRegisterMetaType<KWin::Deleted *>();
|
qRegisterMetaType<KWin::Deleted *>();
|
||||||
qRegisterMetaType<KWin::InternalClient *>();
|
qRegisterMetaType<KWin::InternalClient *>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ void PopupOpenCloseAnimationTest::initTestCase()
|
||||||
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1"));
|
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1"));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,8 +146,8 @@ void ScriptedEffectsTest::initTestCase()
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWin::Deleted*>();
|
qRegisterMetaType<KWin::Deleted*>();
|
||||||
qRegisterMetaType<KWin::Effect*>();
|
qRegisterMetaType<KWin::Effect*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ void ScriptedEffectsTest::initTestCase()
|
||||||
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
||||||
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1");
|
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1");
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QVERIFY(Compositor::self());
|
QVERIFY(Compositor::self());
|
||||||
|
|
||||||
auto scene = KWin::Compositor::self()->scene();
|
auto scene = KWin::Compositor::self()->scene();
|
||||||
|
|
|
@ -63,8 +63,8 @@ void SlidingPopupsTest::initTestCase()
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWin::Deleted*>();
|
qRegisterMetaType<KWin::Deleted*>();
|
||||||
qRegisterMetaType<KWin::Effect*>();
|
qRegisterMetaType<KWin::Effect*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ void SlidingPopupsTest::initTestCase()
|
||||||
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
||||||
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1");
|
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1");
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QVERIFY(Compositor::self());
|
QVERIFY(Compositor::self());
|
||||||
|
|
||||||
auto scene = KWin::Compositor::self()->scene();
|
auto scene = KWin::Compositor::self()->scene();
|
||||||
|
|
|
@ -60,8 +60,8 @@ void ToplevelOpenCloseAnimationTest::initTestCase()
|
||||||
|
|
||||||
qRegisterMetaType<KWin::AbstractClient *>();
|
qRegisterMetaType<KWin::AbstractClient *>();
|
||||||
qRegisterMetaType<KWin::Deleted *>();
|
qRegisterMetaType<KWin::Deleted *>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ void ToplevelOpenCloseAnimationTest::initTestCase()
|
||||||
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1"));
|
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1"));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
|
|
||||||
auto scene = KWin::Compositor::self()->scene();
|
auto scene = KWin::Compositor::self()->scene();
|
||||||
|
|
|
@ -56,8 +56,8 @@ void TranslucencyTest::initTestCase()
|
||||||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWin::Effect*>();
|
qRegisterMetaType<KWin::Effect*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ void TranslucencyTest::initTestCase()
|
||||||
|
|
||||||
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1");
|
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1");
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QVERIFY(Compositor::self());
|
QVERIFY(Compositor::self());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,8 @@ void WindowGeometryTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWin::Effect*>();
|
qRegisterMetaType<KWin::Effect*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ void WindowGeometryTest::initTestCase()
|
||||||
|
|
||||||
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1");
|
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1");
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QVERIFY(KWin::Compositor::self());
|
QVERIFY(KWin::Compositor::self());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,8 @@ void WobblyWindowsShadeTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWin::Effect*>();
|
qRegisterMetaType<KWin::Effect*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ void WobblyWindowsShadeTest::initTestCase()
|
||||||
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
||||||
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1");
|
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1");
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QVERIFY(Compositor::self());
|
QVERIFY(Compositor::self());
|
||||||
|
|
||||||
auto scene = KWin::Compositor::self()->scene();
|
auto scene = KWin::Compositor::self()->scene();
|
||||||
|
|
|
@ -50,8 +50,8 @@ void GenericSceneOpenGLTest::cleanup()
|
||||||
void GenericSceneOpenGLTest::initTestCase()
|
void GenericSceneOpenGLTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ void GenericSceneOpenGLTest::initTestCase()
|
||||||
qputenv("KWIN_COMPOSE", m_envVariable);
|
qputenv("KWIN_COMPOSE", m_envVariable);
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QVERIFY(Compositor::self());
|
QVERIFY(Compositor::self());
|
||||||
|
|
||||||
auto scene = KWin::Compositor::self()->scene();
|
auto scene = KWin::Compositor::self()->scene();
|
||||||
|
|
|
@ -64,8 +64,8 @@ void GlobalShortcutsTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient *>();
|
qRegisterMetaType<KWin::AbstractClient *>();
|
||||||
qRegisterMetaType<KWin::InternalClient *>();
|
qRegisterMetaType<KWin::InternalClient *>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ void GlobalShortcutsTest::initTestCase()
|
||||||
qputenv("XKB_DEFAULT_RULES", "evdev");
|
qputenv("XKB_DEFAULT_RULES", "evdev");
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,14 +56,14 @@ void TestIdleInhibition::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
|
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,14 +62,14 @@ void InputStackingOrderTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWin::Deleted*>();
|
qRegisterMetaType<KWin::Deleted*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -184,15 +184,15 @@ void InternalWindowTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient *>();
|
qRegisterMetaType<KWin::AbstractClient *>();
|
||||||
qRegisterMetaType<KWin::InternalClient *>();
|
qRegisterMetaType<KWin::InternalClient *>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -75,8 +75,8 @@ void KeyboardLayoutTest::reconfigureLayouts()
|
||||||
void KeyboardLayoutTest::initTestCase()
|
void KeyboardLayoutTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ void KeyboardLayoutTest::initTestCase()
|
||||||
kwinApp()->setKxkbConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
kwinApp()->setKxkbConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,8 +58,8 @@ void KeymapCreationFailureTest::initTestCase()
|
||||||
qputenv("XKB_DEFAULT_OPTIONS", "no");
|
qputenv("XKB_DEFAULT_OPTIONS", "no");
|
||||||
|
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ void KeymapCreationFailureTest::initTestCase()
|
||||||
layoutGroup.sync();
|
layoutGroup.sync();
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,6 +136,7 @@ void WaylandTestApplication::finalizeStartup()
|
||||||
disconnect(m_xwayland, &Xwl::Xwayland::initialized, this, &WaylandTestApplication::finalizeStartup);
|
disconnect(m_xwayland, &Xwl::Xwayland::initialized, this, &WaylandTestApplication::finalizeStartup);
|
||||||
}
|
}
|
||||||
createWorkspace();
|
createWorkspace();
|
||||||
|
notifyStarted();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaylandTestApplication::continueStartupWithScene()
|
void WaylandTestApplication::continueStartupWithScene()
|
||||||
|
|
|
@ -58,15 +58,15 @@ private Q_SLOTS:
|
||||||
void KWinBindingsTest::initTestCase()
|
void KWinBindingsTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,15 +184,15 @@ AbstractClient *LockScreenTest::showWindow()
|
||||||
void LockScreenTest::initTestCase()
|
void LockScreenTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -61,8 +61,8 @@ private Q_SLOTS:
|
||||||
void TestMaximized::initTestCase()
|
void TestMaximized::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
@ -70,7 +70,7 @@ void TestMaximized::initTestCase()
|
||||||
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -90,8 +90,8 @@ void Target::shortcut()
|
||||||
|
|
||||||
void ModifierOnlyShortcutTest::initTestCase()
|
void ModifierOnlyShortcutTest::initTestCase()
|
||||||
{
|
{
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ void ModifierOnlyShortcutTest::initTestCase()
|
||||||
qputenv("XKB_DEFAULT_RULES", "evdev");
|
qputenv("XKB_DEFAULT_RULES", "evdev");
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,12 +93,12 @@ void MoveResizeWindowTest::initTestCase()
|
||||||
qRegisterMetaType<KWin::AbstractClient *>();
|
qRegisterMetaType<KWin::AbstractClient *>();
|
||||||
qRegisterMetaType<KWin::Deleted *>();
|
qRegisterMetaType<KWin::Deleted *>();
|
||||||
qRegisterMetaType<KWin::MaximizeMode>("MaximizeMode");
|
qRegisterMetaType<KWin::MaximizeMode>("MaximizeMode");
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 1);
|
QCOMPARE(screens()->count(), 1);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,8 +100,8 @@ void Target::shortcut()
|
||||||
void NoGlobalShortcutsTest::initTestCase()
|
void NoGlobalShortcutsTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::ElectricBorder>("ElectricBorder");
|
qRegisterMetaType<KWin::ElectricBorder>("ElectricBorder");
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit(), KWin::WaylandServer::InitializationFlag::NoGlobalShortcuts));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit(), KWin::WaylandServer::InitializationFlag::NoGlobalShortcuts));
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ void NoGlobalShortcutsTest::initTestCase()
|
||||||
qputenv("XKB_DEFAULT_RULES", "evdev");
|
qputenv("XKB_DEFAULT_RULES", "evdev");
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,8 +91,8 @@ void TestPlacement::cleanup()
|
||||||
void TestPlacement::initTestCase()
|
void TestPlacement::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
@ -100,7 +100,7 @@ void TestPlacement::initTestCase()
|
||||||
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -71,12 +71,12 @@ private:
|
||||||
void PlasmaSurfaceTest::initTestCase()
|
void PlasmaSurfaceTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient *>();
|
qRegisterMetaType<KWin::AbstractClient *>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlasmaSurfaceTest::init()
|
void PlasmaSurfaceTest::init()
|
||||||
|
|
|
@ -68,14 +68,14 @@ private:
|
||||||
void PlasmaWindowTest::initTestCase()
|
void PlasmaWindowTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -37,12 +37,12 @@ private Q_SLOTS:
|
||||||
|
|
||||||
void PlatformCursorTest::initTestCase()
|
void PlatformCursorTest::initTestCase()
|
||||||
{
|
{
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlatformCursorTest::testPos()
|
void PlatformCursorTest::testPos()
|
||||||
|
|
|
@ -70,8 +70,8 @@ void TestPointerConstraints::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<PointerFunc>();
|
qRegisterMetaType<PointerFunc>();
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
@ -86,7 +86,7 @@ void TestPointerConstraints::initTestCase()
|
||||||
|
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -148,8 +148,8 @@ void PointerInputTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWin::Deleted*>();
|
qRegisterMetaType<KWin::Deleted*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
@ -166,7 +166,7 @@ void PointerInputTest::initTestCase()
|
||||||
qputenv("XKB_DEFAULT_RULES", "evdev");
|
qputenv("XKB_DEFAULT_RULES", "evdev");
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -93,8 +93,8 @@ void QuickTilingTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWin::MaximizeMode>("MaximizeMode");
|
qRegisterMetaType<KWin::MaximizeMode>("MaximizeMode");
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
@ -110,7 +110,7 @@ void QuickTilingTest::initTestCase()
|
||||||
qputenv("XKB_DEFAULT_RULES", "evdev");
|
qputenv("XKB_DEFAULT_RULES", "evdev");
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -113,8 +113,8 @@ void SceneOpenGLShadowTest::initTestCase()
|
||||||
// Copied from generic_scene_opengl_test.cpp
|
// Copied from generic_scene_opengl_test.cpp
|
||||||
|
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ void SceneOpenGLShadowTest::initTestCase()
|
||||||
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QVERIFY(KWin::Compositor::self());
|
QVERIFY(KWin::Compositor::self());
|
||||||
|
|
||||||
// Add directory with fake decorations to the plugin search path.
|
// Add directory with fake decorations to the plugin search path.
|
||||||
|
|
|
@ -117,8 +117,8 @@ void SceneQPainterShadowTest::initTestCase()
|
||||||
// Copied from scene_qpainter_test.cpp
|
// Copied from scene_qpainter_test.cpp
|
||||||
|
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ void SceneQPainterShadowTest::initTestCase()
|
||||||
qputenv("KWIN_COMPOSE", QByteArrayLiteral("Q"));
|
qputenv("KWIN_COMPOSE", QByteArrayLiteral("Q"));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QVERIFY(KWin::Compositor::self());
|
QVERIFY(KWin::Compositor::self());
|
||||||
|
|
||||||
// Add directory with fake decorations to the plugin search path.
|
// Add directory with fake decorations to the plugin search path.
|
||||||
|
|
|
@ -68,8 +68,8 @@ void SceneQPainterTest::cleanup()
|
||||||
void SceneQPainterTest::initTestCase()
|
void SceneQPainterTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ void SceneQPainterTest::initTestCase()
|
||||||
qputenv("KWIN_COMPOSE", QByteArrayLiteral("Q"));
|
qputenv("KWIN_COMPOSE", QByteArrayLiteral("Q"));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QVERIFY(Compositor::self());
|
QVERIFY(Compositor::self());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,13 +45,13 @@ private Q_SLOTS:
|
||||||
|
|
||||||
void ScreenChangesTest::initTestCase()
|
void ScreenChangesTest::initTestCase()
|
||||||
{
|
{
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
setenv("QT_QPA_PLATFORM", "wayland", true);
|
setenv("QT_QPA_PLATFORM", "wayland", true);
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,8 @@ void ScreenEdgeClientShowTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWin::Deleted*>();
|
qRegisterMetaType<KWin::Deleted*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
@ -67,7 +67,7 @@ void ScreenEdgeClientShowTest::initTestCase()
|
||||||
kwinApp()->setConfig(config);
|
kwinApp()->setConfig(config);
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -56,14 +56,14 @@ void MinimizeAllScriptTest::initTestCase()
|
||||||
|
|
||||||
qRegisterMetaType<AbstractClient *>();
|
qRegisterMetaType<AbstractClient *>();
|
||||||
|
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -59,8 +59,8 @@ private:
|
||||||
|
|
||||||
void ScreenEdgeTest::initTestCase()
|
void ScreenEdgeTest::initTestCase()
|
||||||
{
|
{
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ void ScreenEdgeTest::initTestCase()
|
||||||
kwinApp()->setConfig(config);
|
kwinApp()->setConfig(config);
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QVERIFY(Scripting::self());
|
QVERIFY(Scripting::self());
|
||||||
|
|
||||||
ScreenEdges::self()->setTimeThreshold(0);
|
ScreenEdges::self()->setTimeThreshold(0);
|
||||||
|
|
|
@ -49,14 +49,14 @@ private Q_SLOTS:
|
||||||
void ShadeTest::initTestCase()
|
void ShadeTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -46,13 +46,13 @@ private Q_SLOTS:
|
||||||
void ShowingDesktopTest::initTestCase()
|
void ShowingDesktopTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,15 +67,15 @@ void StackingOrderTest::initTestCase()
|
||||||
qRegisterMetaType<KWin::AbstractClient *>();
|
qRegisterMetaType<KWin::AbstractClient *>();
|
||||||
qRegisterMetaType<KWin::Deleted *>();
|
qRegisterMetaType<KWin::Deleted *>();
|
||||||
|
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,8 +68,8 @@ void StrutsTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWin::Deleted*>();
|
qRegisterMetaType<KWin::Deleted*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
@ -83,7 +83,7 @@ void StrutsTest::initTestCase()
|
||||||
kwinApp()->setConfig(config);
|
kwinApp()->setConfig(config);
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -53,8 +53,8 @@ private Q_SLOTS:
|
||||||
void TabBoxTest::initTestCase()
|
void TabBoxTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ void TabBoxTest::initTestCase()
|
||||||
qputenv("KWIN_XKB_DEFAULT_KEYMAP", "1");
|
qputenv("KWIN_XKB_DEFAULT_KEYMAP", "1");
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,14 +58,14 @@ private:
|
||||||
void TouchInputTest::initTestCase()
|
void TouchInputTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -63,14 +63,14 @@ private Q_SLOTS:
|
||||||
void TransientPlacementTest::initTestCase()
|
void TransientPlacementTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -52,8 +52,8 @@ private Q_SLOTS:
|
||||||
void VirtualDesktopTest::initTestCase()
|
void VirtualDesktopTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ void VirtualDesktopTest::initTestCase()
|
||||||
qputenv("XKB_DEFAULT_RULES", "evdev");
|
qputenv("XKB_DEFAULT_RULES", "evdev");
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
|
|
||||||
if (kwinApp()->x11Connection()) {
|
if (kwinApp()->x11Connection()) {
|
||||||
|
|
|
@ -53,14 +53,14 @@ void WindowRuleTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWin::Deleted*>();
|
qRegisterMetaType<KWin::Deleted*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -64,15 +64,15 @@ private Q_SLOTS:
|
||||||
void TestWindowSelection::initTestCase()
|
void TestWindowSelection::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
qputenv("XKB_DEFAULT_RULES", "evdev");
|
qputenv("XKB_DEFAULT_RULES", "evdev");
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -67,14 +67,14 @@ void X11ClientTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::Deleted*>();
|
qRegisterMetaType<KWin::Deleted*>();
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QVERIFY(KWin::Compositor::self());
|
QVERIFY(KWin::Compositor::self());
|
||||||
waylandServer()->initWorkspace();
|
waylandServer()->initWorkspace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,14 +226,14 @@ void TestXdgShellClientRules::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient *>();
|
qRegisterMetaType<KWin::AbstractClient *>();
|
||||||
|
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -126,14 +126,14 @@ void TestXdgShellClient::initTestCase()
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWayland::Client::Output*>();
|
qRegisterMetaType<KWayland::Client::Output*>();
|
||||||
|
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -53,14 +53,14 @@ void XWaylandInputTest::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<KWin::Deleted*>();
|
qRegisterMetaType<KWin::Deleted*>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
|
@ -54,8 +54,8 @@ void XwaylandSelectionsTest::initTestCase()
|
||||||
QSKIP("Skipped as it fails for unknown reasons on build.kde.org");
|
QSKIP("Skipped as it fails for unknown reasons on build.kde.org");
|
||||||
qRegisterMetaType<KWin::AbstractClient*>();
|
qRegisterMetaType<KWin::AbstractClient*>();
|
||||||
qRegisterMetaType<QProcess::ExitStatus>();
|
qRegisterMetaType<QProcess::ExitStatus>();
|
||||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
|
||||||
QVERIFY(workspaceCreatedSpy.isValid());
|
QVERIFY(applicationStartedSpy.isValid());
|
||||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||||
// QSignalSpy clipboardSyncDevicedCreated{waylandServer(), &WaylandServer::xclipboardSyncDataDeviceCreated};
|
// QSignalSpy clipboardSyncDevicedCreated{waylandServer(), &WaylandServer::xclipboardSyncDataDeviceCreated};
|
||||||
// QVERIFY(clipboardSyncDevicedCreated.isValid());
|
// QVERIFY(clipboardSyncDevicedCreated.isValid());
|
||||||
|
@ -63,7 +63,7 @@ void XwaylandSelectionsTest::initTestCase()
|
||||||
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
|
||||||
|
|
||||||
kwinApp()->start();
|
kwinApp()->start();
|
||||||
QVERIFY(workspaceCreatedSpy.wait());
|
QVERIFY(applicationStartedSpy.wait());
|
||||||
QCOMPARE(screens()->count(), 2);
|
QCOMPARE(screens()->count(), 2);
|
||||||
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
|
||||||
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
|
||||||
|
|
5
main.cpp
5
main.cpp
|
@ -160,6 +160,11 @@ Application::~Application()
|
||||||
destroyPlatform();
|
destroyPlatform();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Application::notifyStarted()
|
||||||
|
{
|
||||||
|
emit started();
|
||||||
|
}
|
||||||
|
|
||||||
void Application::destroyAtoms()
|
void Application::destroyAtoms()
|
||||||
{
|
{
|
||||||
delete atoms;
|
delete atoms;
|
||||||
|
|
2
main.h
2
main.h
|
@ -194,12 +194,14 @@ Q_SIGNALS:
|
||||||
void workspaceCreated();
|
void workspaceCreated();
|
||||||
void screensCreated();
|
void screensCreated();
|
||||||
void virtualTerminalCreated();
|
void virtualTerminalCreated();
|
||||||
|
void started();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Application(OperationMode mode, int &argc, char **argv);
|
Application(OperationMode mode, int &argc, char **argv);
|
||||||
virtual void performStartup() = 0;
|
virtual void performStartup() = 0;
|
||||||
|
|
||||||
void notifyKSplash();
|
void notifyKSplash();
|
||||||
|
void notifyStarted();
|
||||||
void createInput();
|
void createInput();
|
||||||
void createWorkspace();
|
void createWorkspace();
|
||||||
void createAtoms();
|
void createAtoms();
|
||||||
|
|
|
@ -192,6 +192,7 @@ void ApplicationWayland::finalizeStartup()
|
||||||
}
|
}
|
||||||
startSession();
|
startSession();
|
||||||
createWorkspace();
|
createWorkspace();
|
||||||
|
notifyStarted();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplicationWayland::continueStartupWithScene()
|
void ApplicationWayland::continueStartupWithScene()
|
||||||
|
|
|
@ -249,6 +249,8 @@ void ApplicationX11::performStartup()
|
||||||
Xcb::sync(); // Trigger possible errors, there's still a chance to abort
|
Xcb::sync(); // Trigger possible errors, there's still a chance to abort
|
||||||
|
|
||||||
notifyKSplash();
|
notifyKSplash();
|
||||||
|
|
||||||
|
notifyStarted();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(platform(), &Platform::initFailed, this,
|
connect(platform(), &Platform::initFailed, this,
|
||||||
|
|
Loading…
Reference in a new issue