Commit 175037d9 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Prefer the term "window" over "client" in Workspace

parent 4bb276aa
Pipeline #168243 passed with stage
in 15 minutes and 34 seconds
......@@ -119,7 +119,7 @@ void ActivitiesTest::testSetOnActivitiesValidates()
xcb_flush(c.data());
// we should get a client for it
QSignalSpy windowCreatedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy windowCreatedSpy(workspace(), &Workspace::windowAdded);
QVERIFY(windowCreatedSpy.isValid());
QVERIFY(windowCreatedSpy.wait());
X11Window *client = windowCreatedSpy.first().first().value<X11Window *>();
......
......@@ -101,8 +101,8 @@ void TestDbusInterface::testGetWindowInfoInvalidUuid()
void TestDbusInterface::testGetWindowInfoXdgShellClient()
{
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
QVERIFY(clientAddedSpy.isValid());
QSignalSpy windowAddedSpy(workspace(), &Workspace::windowAdded);
QVERIFY(windowAddedSpy.isValid());
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
......@@ -111,9 +111,9 @@ void TestDbusInterface::testGetWindowInfoXdgShellClient()
// now let's render
Test::render(surface.data(), QSize(100, 50), Qt::blue);
QVERIFY(clientAddedSpy.isEmpty());
QVERIFY(clientAddedSpy.wait());
auto client = clientAddedSpy.first().first().value<Window *>();
QVERIFY(windowAddedSpy.isEmpty());
QVERIFY(windowAddedSpy.wait());
auto client = windowAddedSpy.first().first().value<Window *>();
QVERIFY(client);
const QVariantMap expectedData = {
......@@ -194,7 +194,7 @@ void TestDbusInterface::testGetWindowInfoXdgShellClient()
// not testing fullscreen, maximizeHorizontal, maximizeVertical and noBorder as those require window geometry changes
QCOMPARE(client->desktop(), 1);
workspace()->sendClientToDesktop(client, 2, false);
workspace()->sendWindowToDesktop(client, 2, false);
QCOMPARE(client->desktop(), 2);
reply = getWindowInfo(client->internalId());
reply.waitForFinished();
......@@ -254,7 +254,7 @@ void TestDbusInterface::testGetWindowInfoX11Client()
xcb_flush(c.data());
// we should get a client for it
QSignalSpy windowCreatedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy windowCreatedSpy(workspace(), &Workspace::windowAdded);
QVERIFY(windowCreatedSpy.isValid());
QVERIFY(windowCreatedSpy.wait());
X11Window *client = windowCreatedSpy.first().first().value<X11Window *>();
......
......@@ -489,12 +489,12 @@ void DebugConsoleTest::testClosingDebugConsole()
QSignalSpy destroyedSpy(console, &QObject::destroyed);
QVERIFY(destroyedSpy.isValid());
QSignalSpy clientAddedSpy(workspace(), &Workspace::internalClientAdded);
QVERIFY(clientAddedSpy.isValid());
QSignalSpy windowAddedSpy(workspace(), &Workspace::internalWindowAdded);
QVERIFY(windowAddedSpy.isValid());
console->show();
QCOMPARE(console->windowHandle()->isVisible(), true);
QTRY_COMPARE(clientAddedSpy.count(), 1);
InternalWindow *c = clientAddedSpy.first().first().value<InternalWindow *>();
QTRY_COMPARE(windowAddedSpy.count(), 1);
InternalWindow *c = windowAddedSpy.first().first().value<InternalWindow *>();
QVERIFY(c->isInternal());
QCOMPARE(c->internalWindow(), console->windowHandle());
QVERIFY(c->isDecorated());
......
......@@ -110,7 +110,7 @@ Window *DecorationInputTest::showWindow()
shellSurface->xdgSurface()->ack_configure(surfaceConfigureRequestedSpy.last().at(0).value<quint32>());
auto c = Test::renderAndWaitForShown(surface, QSize(500, 50), Qt::blue);
VERIFY(c);
COMPARE(workspace()->activeClient(), c);
COMPARE(workspace()->activeWindow(), c);
#undef VERIFY
#undef COMPARE
......@@ -775,12 +775,12 @@ void DecorationInputTest::testTooltipDoesntEatKeyEvents()
QSignalSpy keyEvent(keyboard, &KWayland::Client::Keyboard::keyChanged);
QVERIFY(keyEvent.isValid());
QSignalSpy clientAddedSpy(workspace(), &Workspace::internalClientAdded);
QVERIFY(clientAddedSpy.isValid());
QSignalSpy windowAddedSpy(workspace(), &Workspace::internalWindowAdded);
QVERIFY(windowAddedSpy.isValid());
c->decoratedClient()->requestShowToolTip(QStringLiteral("test"));
// now we should get an internal window
QVERIFY(clientAddedSpy.wait());
InternalWindow *internal = clientAddedSpy.first().first().value<InternalWindow *>();
QVERIFY(windowAddedSpy.wait());
InternalWindow *internal = windowAddedSpy.first().first().value<InternalWindow *>();
QVERIFY(internal->isInternal());
QVERIFY(internal->internalWindow()->flags().testFlag(Qt::ToolTip));
......
......@@ -137,7 +137,7 @@ void X11DesktopWindowTest::testDesktopWindow()
QCOMPARE(geo->depth, uint8_t(32));
// we should get a client for it
QSignalSpy windowCreatedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy windowCreatedSpy(workspace(), &Workspace::windowAdded);
QVERIFY(windowCreatedSpy.isValid());
QVERIFY(windowCreatedSpy.wait());
X11Window *client = windowCreatedSpy.first().first().value<X11Window *>();
......
......@@ -96,7 +96,7 @@ void DontCrashAuroraeDestroyDecoTest::testBorderlessMaximizedWindows()
xcb_flush(c);
// we should get a client for it
QSignalSpy windowCreatedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy windowCreatedSpy(workspace(), &Workspace::windowAdded);
QVERIFY(windowCreatedSpy.isValid());
QVERIFY(windowCreatedSpy.wait());
X11Window *client = windowCreatedSpy.first().first().value<X11Window *>();
......
......@@ -90,7 +90,7 @@ void DontCrashCancelAnimationFromAnimationEndedTest::testScript()
// let's render
auto c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
QVERIFY(c);
QCOMPARE(workspace()->activeClient(), c);
QCOMPARE(workspace()->activeWindow(), c);
// make sure we animate
QTest::qWait(200);
......
......@@ -81,7 +81,7 @@ void DontCrashEmptyDecorationTest::testBug361551()
xcb_flush(c);
// we should get a client for it
QSignalSpy windowCreatedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy windowCreatedSpy(workspace(), &Workspace::windowAdded);
QVERIFY(windowCreatedSpy.isValid());
QVERIFY(windowCreatedSpy.wait());
X11Window *client = windowCreatedSpy.first().first().value<X11Window *>();
......
......@@ -46,16 +46,16 @@ void DontCrashGlxgearsTest::testGlxgears()
// closing a glxgears window through Aurorae themes used to crash KWin
// Let's make sure that doesn't happen anymore
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
QVERIFY(clientAddedSpy.isValid());
QSignalSpy windowAddedSpy(workspace(), &Workspace::windowAdded);
QVERIFY(windowAddedSpy.isValid());
QProcess glxgears;
glxgears.setProgram(QStringLiteral("glxgears"));
glxgears.start();
QVERIFY(glxgears.waitForStarted());
QVERIFY(clientAddedSpy.wait());
QCOMPARE(clientAddedSpy.count(), 1);
QVERIFY(windowAddedSpy.wait());
QCOMPARE(windowAddedSpy.count(), 1);
QCOMPARE(workspace()->clientList().count(), 1);
X11Window *glxgearsClient = workspace()->clientList().first();
QVERIFY(glxgearsClient->isDecorated());
......
......@@ -100,7 +100,7 @@ void DontCrashNoBorder::testCreateWindow()
shellSurface->xdgSurface()->ack_configure(surfaceConfigureRequestedSpy.last().at(0).value<quint32>());
auto c = Test::renderAndWaitForShown(surface.data(), QSize(500, 50), Qt::blue);
QVERIFY(c);
QCOMPARE(workspace()->activeClient(), c);
QCOMPARE(workspace()->activeWindow(), c);
QVERIFY(!c->isDecorated());
}
......
......@@ -89,17 +89,17 @@ void TestDontCrashUseractionsMenu::testShowHideShowUseractionsMenu()
workspace()->showWindowMenu(QRect(), client);
auto userActionsMenu = workspace()->userActionsMenu();
QTRY_VERIFY(userActionsMenu->isShown());
QVERIFY(userActionsMenu->hasClient());
QVERIFY(userActionsMenu->hasWindow());
Test::keyboardKeyPressed(KEY_ESC, 0);
Test::keyboardKeyReleased(KEY_ESC, 1);
QTRY_VERIFY(!userActionsMenu->isShown());
QVERIFY(!userActionsMenu->hasClient());
QVERIFY(!userActionsMenu->hasWindow());
// and show again, this triggers BUG 382063
workspace()->showWindowMenu(QRect(), client);
QTRY_VERIFY(userActionsMenu->isShown());
QVERIFY(userActionsMenu->hasClient());
QVERIFY(userActionsMenu->hasWindow());
}
WAYLANDTEST_MAIN(TestDontCrashUseractionsMenu)
......
......@@ -179,7 +179,7 @@ void PopupOpenCloseAnimationTest::testAnimateUserActionsPopup()
workspace()->showWindowMenu(QRect(), client);
auto userActionsMenu = workspace()->userActionsMenu();
QTRY_VERIFY(userActionsMenu->isShown());
QVERIFY(userActionsMenu->hasClient());
QVERIFY(userActionsMenu->hasWindow());
QVERIFY(effect->isActive());
// Eventually, the animation will be complete.
......@@ -189,7 +189,7 @@ void PopupOpenCloseAnimationTest::testAnimateUserActionsPopup()
Test::keyboardKeyPressed(KEY_ESC, 0);
Test::keyboardKeyReleased(KEY_ESC, 1);
QTRY_VERIFY(!userActionsMenu->isShown());
QVERIFY(!userActionsMenu->hasClient());
QVERIFY(!userActionsMenu->hasWindow());
QVERIFY(effect->isActive());
// Eventually, the animation will be complete.
......@@ -238,7 +238,7 @@ void PopupOpenCloseAnimationTest::testAnimateDecorationTooltips()
QVERIFY(!effect->isActive());
// Show a decoration tooltip.
QSignalSpy tooltipAddedSpy(workspace(), &Workspace::internalClientAdded);
QSignalSpy tooltipAddedSpy(workspace(), &Workspace::internalWindowAdded);
QVERIFY(tooltipAddedSpy.isValid());
client->decoratedClient()->requestShowToolTip(QStringLiteral("KWin rocks!"));
QVERIFY(tooltipAddedSpy.wait());
......
......@@ -195,7 +195,7 @@ void ScriptedEffectsTest::testEffectsHandler()
shellSurface->set_title("WindowA");
auto *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
QVERIFY(c);
QCOMPARE(workspace()->activeClient(), c);
QCOMPARE(workspace()->activeWindow(), c);
waitFor("windowAdded - WindowA");
waitFor("stackingOrder - 1 WindowA");
......@@ -274,7 +274,7 @@ void ScriptedEffectsTest::testAnimations()
shellSurface->set_title("Window 1");
auto *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
QVERIFY(c);
QCOMPARE(workspace()->activeClient(), c);
QCOMPARE(workspace()->activeWindow(), c);
{
const auto state = effect->state();
......@@ -381,7 +381,7 @@ void ScriptedEffectsTest::testFullScreenEffect()
shellSurface->set_title("Window 1");
auto *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
QVERIFY(c);
QCOMPARE(workspace()->activeClient(), c);
QCOMPARE(workspace()->activeWindow(), c);
QCOMPARE(effects->hasActiveFullScreenEffect(), false);
QCOMPARE(effectMain->isActiveFullScreenEffect(), false);
......@@ -444,7 +444,7 @@ void ScriptedEffectsTest::testKeepAlive()
QVERIFY(shellSurface);
auto *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
QVERIFY(c);
QCOMPARE(workspace()->activeClient(), c);
QCOMPARE(workspace()->activeWindow(), c);
// no active animations at the beginning
QCOMPARE(effect->state().count(), 0);
......@@ -490,7 +490,7 @@ void ScriptedEffectsTest::testGrab()
QVERIFY(shellSurface);
Window *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
QVERIFY(c);
QCOMPARE(workspace()->activeClient(), c);
QCOMPARE(workspace()->activeWindow(), c);
// the test effect should grab the test client successfully
QCOMPARE(effectOutputSpy.count(), 1);
......@@ -523,7 +523,7 @@ void ScriptedEffectsTest::testGrabAlreadyGrabbedWindow()
QVERIFY(shellSurface);
Window *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
QVERIFY(c);
QCOMPARE(workspace()->activeClient(), c);
QCOMPARE(workspace()->activeWindow(), c);
// effect that initially held the grab should still hold the grab
QCOMPARE(ownerOutputSpy.count(), 1);
......@@ -560,7 +560,7 @@ void ScriptedEffectsTest::testGrabAlreadyGrabbedWindowForced()
QVERIFY(shellSurface);
Window *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
QVERIFY(c);
QCOMPARE(workspace()->activeClient(), c);
QCOMPARE(workspace()->activeWindow(), c);
// verify that the owner in fact held the grab
QCOMPARE(ownerOutputSpy.count(), 1);
......@@ -591,7 +591,7 @@ void ScriptedEffectsTest::testUngrab()
QVERIFY(shellSurface);
Window *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
QVERIFY(c);
QCOMPARE(workspace()->activeClient(), c);
QCOMPARE(workspace()->activeWindow(), c);
// the test effect should grab the test client successfully
QCOMPARE(effectOutputSpy.count(), 1);
......@@ -634,7 +634,7 @@ void ScriptedEffectsTest::testRedirect()
QVERIFY(shellSurface);
Window *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
QVERIFY(c);
QCOMPARE(workspace()->activeClient(), c);
QCOMPARE(workspace()->activeWindow(), c);
auto around = [](std::chrono::milliseconds elapsed,
std::chrono::milliseconds pivot,
......@@ -712,7 +712,7 @@ void ScriptedEffectsTest::testComplete()
QVERIFY(shellSurface);
Window *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
QVERIFY(c);
QCOMPARE(workspace()->activeClient(), c);
QCOMPARE(workspace()->activeWindow(), c);
auto around = [](std::chrono::milliseconds elapsed,
std::chrono::milliseconds pivot,
......
......@@ -198,7 +198,7 @@ void SlidingPopupsTest::testWithOtherEffect()
xcb_flush(c.data());
// we should get a client for it
QSignalSpy windowCreatedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy windowCreatedSpy(workspace(), &Workspace::windowAdded);
QVERIFY(windowCreatedSpy.isValid());
QVERIFY(windowCreatedSpy.wait());
X11Window *client = windowCreatedSpy.first().first().value<X11Window *>();
......
......@@ -134,7 +134,7 @@ void TranslucencyTest::testMoveAfterDesktopChange()
xcb_flush(c.data());
// we should get a client for it
QSignalSpy windowCreatedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy windowCreatedSpy(workspace(), &Workspace::windowAdded);
QVERIFY(windowCreatedSpy.isValid());
QVERIFY(windowCreatedSpy.wait());
X11Window *client = windowCreatedSpy.first().first().value<X11Window *>();
......@@ -147,7 +147,7 @@ void TranslucencyTest::testMoveAfterDesktopChange()
// let's send the window to desktop 2
effects->setNumberOfDesktops(2);
QCOMPARE(effects->numberOfDesktops(), 2);
workspace()->sendClientToDesktop(client, 2, false);
workspace()->sendWindowToDesktop(client, 2, false);
effects->setCurrentDesktop(2);
QVERIFY(!m_translucencyEffect->isActive());
KWin::Cursors::self()->mouse()->setPos(client->frameGeometry().center());
......@@ -202,7 +202,7 @@ void TranslucencyTest::testDialogClose()
xcb_flush(c.data());
// we should get a client for it
QSignalSpy windowCreatedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy windowCreatedSpy(workspace(), &Workspace::windowAdded);
QVERIFY(windowCreatedSpy.isValid());
QVERIFY(windowCreatedSpy.wait());
X11Window *client = windowCreatedSpy.first().first().value<X11Window *>();
......
......@@ -119,7 +119,7 @@ void WobblyWindowsShadeTest::testShadeMove()
xcb_flush(c.data());
// we should get a client for it
QSignalSpy windowCreatedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy windowCreatedSpy(workspace(), &Workspace::windowAdded);
QVERIFY(windowCreatedSpy.isValid());
QVERIFY(windowCreatedSpy.wait());
X11Window *client = windowCreatedSpy.first().first().value<X11Window *>();
......@@ -142,10 +142,10 @@ void WobblyWindowsShadeTest::testShadeMove()
QVERIFY(windowStartUserMovedResizedSpy.isValid());
// begin move
QVERIFY(workspace()->moveResizeClient() == nullptr);
QVERIFY(workspace()->moveResizeWindow() == nullptr);
QCOMPARE(client->isInteractiveMove(), false);
workspace()->slotWindowMove();
QCOMPARE(workspace()->moveResizeClient(), client);
QCOMPARE(workspace()->moveResizeWindow(), client);
QCOMPARE(client->isInteractiveMove(), true);
QCOMPARE(windowStartUserMovedResizedSpy.count(), 1);
......
......@@ -330,13 +330,13 @@ void GlobalShortcutsTest::testX11ClientShortcut()
xcb_map_window(c.data(), w);
xcb_flush(c.data());
QSignalSpy windowCreatedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy windowCreatedSpy(workspace(), &Workspace::windowAdded);
QVERIFY(windowCreatedSpy.isValid());
QVERIFY(windowCreatedSpy.wait());
X11Window *client = windowCreatedSpy.last().first().value<X11Window *>();
QVERIFY(client);
QCOMPARE(workspace()->activeClient(), client);
QCOMPARE(workspace()->activeWindow(), client);
QVERIFY(client->isActive());
QCOMPARE(client->shortcut(), QKeySequence());
const QKeySequence seq(Qt::META | Qt::SHIFT | Qt::Key_Y);
......@@ -349,8 +349,8 @@ void GlobalShortcutsTest::testX11ClientShortcut()
// it's delayed
QCoreApplication::processEvents();
workspace()->activateClient(nullptr);
QVERIFY(!workspace()->activeClient());
workspace()->activateWindow(nullptr);
QVERIFY(!workspace()->activeWindow());
QVERIFY(!client->isActive());
// now let's trigger the shortcut
......@@ -358,7 +358,7 @@ void GlobalShortcutsTest::testX11ClientShortcut()
Test::keyboardKeyPressed(KEY_LEFTMETA, timestamp++);
Test::keyboardKeyPressed(KEY_LEFTSHIFT, timestamp++);
Test::keyboardKeyPressed(KEY_Y, timestamp++);
QTRY_COMPARE(workspace()->activeClient(), client);
QTRY_COMPARE(workspace()->activeWindow(), client);
Test::keyboardKeyReleased(KEY_Y, timestamp++);
Test::keyboardKeyReleased(KEY_LEFTSHIFT, timestamp++);
Test::keyboardKeyReleased(KEY_LEFTMETA, timestamp++);
......@@ -378,7 +378,7 @@ void GlobalShortcutsTest::testWaylandClientShortcut()
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
auto client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
QCOMPARE(workspace()->activeClient(), client);
QCOMPARE(workspace()->activeWindow(), client);
QVERIFY(client->isActive());
QCOMPARE(client->shortcut(), QKeySequence());
const QKeySequence seq(Qt::META | Qt::SHIFT | Qt::Key_Y);
......@@ -388,8 +388,8 @@ void GlobalShortcutsTest::testWaylandClientShortcut()
QVERIFY(!workspace()->shortcutAvailable(seq));
QCOMPARE(client->caption(), QStringLiteral(" {Meta+Shift+Y}"));
workspace()->activateClient(nullptr);
QVERIFY(!workspace()->activeClient());
workspace()->activateWindow(nullptr);
QVERIFY(!workspace()->activeWindow());
QVERIFY(!client->isActive());
// now let's trigger the shortcut
......@@ -397,7 +397,7 @@ void GlobalShortcutsTest::testWaylandClientShortcut()
Test::keyboardKeyPressed(KEY_LEFTMETA, timestamp++);
Test::keyboardKeyPressed(KEY_LEFTSHIFT, timestamp++);
Test::keyboardKeyPressed(KEY_Y, timestamp++);
QTRY_COMPARE(workspace()->activeClient(), client);
QTRY_COMPARE(workspace()->activeWindow(), client);
Test::keyboardKeyReleased(KEY_Y, timestamp++);
Test::keyboardKeyReleased(KEY_LEFTSHIFT, timestamp++);
Test::keyboardKeyReleased(KEY_LEFTMETA, timestamp++);
......@@ -416,11 +416,11 @@ void GlobalShortcutsTest::testSetupWindowShortcut()
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
auto client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
QCOMPARE(workspace()->activeClient(), client);
QCOMPARE(workspace()->activeWindow(), client);
QVERIFY(client->isActive());
QCOMPARE(client->shortcut(), QKeySequence());
QSignalSpy shortcutDialogAddedSpy(workspace(), &Workspace::internalClientAdded);
QSignalSpy shortcutDialogAddedSpy(workspace(), &Workspace::internalWindowAdded);
QVERIFY(shortcutDialogAddedSpy.isValid());
workspace()->slotSetupWindowShortcut();
QTRY_COMPARE(shortcutDialogAddedSpy.count(), 1);
......
......@@ -238,13 +238,13 @@ void TestIdleInhibition::testDontInhibitWhenUnmapped()
QVERIFY(inhibitor);
// Map the client.
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
QVERIFY(clientAddedSpy.isValid());
QSignalSpy windowAddedSpy(workspace(), &Workspace::windowAdded);
QVERIFY(windowAddedSpy.isValid());
Test::render(surface.data(), QSize(100, 50), Qt::blue);
QVERIFY(clientAddedSpy.isEmpty());
QVERIFY(clientAddedSpy.wait());
QCOMPARE(clientAddedSpy.count(), 1);
Window *client = clientAddedSpy.last().first().value<Window *>();
QVERIFY(windowAddedSpy.isEmpty());
QVERIFY(windowAddedSpy.wait());
QCOMPARE(windowAddedSpy.count(), 1);
Window *client = windowAddedSpy.last().first().value<Window *>();
QVERIFY(client);
QCOMPARE(client->readyForPainting(), true);
......@@ -275,9 +275,9 @@ void TestIdleInhibition::testDontInhibitWhenUnmapped()
// Map the client.
Test::render(surface.data(), QSize(100, 50), Qt::blue);
QVERIFY(clientAddedSpy.wait());
QCOMPARE(clientAddedSpy.count(), 2);
client = clientAddedSpy.last().first().value<Window *>();
QVERIFY(windowAddedSpy.wait());
QCOMPARE(windowAddedSpy.count(), 2);
client = windowAddedSpy.last().first().value<Window *>();
QVERIFY(client);
QCOMPARE(client->readyForPainting(), true);
......
......@@ -103,15 +103,15 @@ void InputStackingOrderTest::testPointerFocusUpdatesOnStackingOrderChange()
QVERIFY(leftSpy.isValid());
// now create the two windows and make them overlap
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
QVERIFY(clientAddedSpy.isValid());
QSignalSpy windowAddedSpy(workspace(), &Workspace::windowAdded);
QVERIFY(windowAddedSpy.isValid());
KWayland::Client::Surface *surface1 = Test::createSurface(Test::waylandCompositor());
QVERIFY(surface1);
Test::XdgToplevel *shellSurface1 = Test::createXdgToplevelSurface(surface1, surface1);
QVERIFY(shellSurface1);
render(surface1);
QVERIFY(clientAddedSpy.wait());
Window *window1 = workspace()->activeClient();
QVERIFY(windowAddedSpy.wait());
Window *window1 = workspace()->activeWindow();
QVERIFY(window1);
KWayland::Client::Surface *surface2 = Test::createSurface(Test::waylandCompositor());
......@@ -119,9 +119,9 @@ void InputStackingOrderTest::testPointerFocusUpdatesOnStackingOrderChange()
Test::XdgToplevel *shellSurface2 = Test::createXdgToplevelSurface(surface2, surface2);
QVERIFY(shellSurface2);
render(surface2);
QVERIFY(clientAddedSpy.wait());
QVERIFY(windowAddedSpy.wait());
Window *window2 = workspace()->activeClient();
Window *window2 = workspace()->activeWindow();
QVERIFY(window2);
QVERIFY(window1 != window2);
......@@ -140,7 +140,7 @@ void InputStackingOrderTest::testPointerFocusUpdatesOnStackingOrderChange()
// raise window 1 above window 2
QVERIFY(leftSpy.isEmpty());
workspace()->raiseClient(window1);
workspace()->raiseWindow(window1);
// should send leave to window2
QVERIFY(leftSpy.wait());
QCOMPARE(leftSpy.count(), 1);
......
......@@ -114,9 +114,9 @@ void InputMethodTest::cleanup()
void InputMethodTest::testOpenClose()
{
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy clientRemovedSpy(workspace(), &Workspace::clientRemoved);
QVERIFY(clientAddedSpy.isValid());
QSignalSpy windowAddedSpy(workspace(), &Workspace::windowAdded);
QSignalSpy windowRemovedSpy(workspace(), &Workspace::windowRemoved);
QVERIFY(windowAddedSpy.isValid());
// Create an xdg_toplevel surface and wait for the compositor to catch up.
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
......@@ -139,9 +139,9 @@ void InputMethodTest::testOpenClose()
// Show the keyboard
touchNow();
textInput->showInputPanel();
QVERIFY(clientAddedSpy.wait());
QVERIFY(windowAddedSpy.wait());
Window *keyboardClient = clientAddedSpy.last().first().value<Window *>();
Window *keyboardClient = windowAddedSpy.last().first().value<Window *>();
QVERIFY(keyboardClient);
QVERIFY(keyboardClient->isInputMethod());
......@@ -201,8 +201,8 @@ void InputMethodTest::testEnableActive()
{
QVERIFY(!InputMethod::self()->isActive());
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy clientRemovedSpy(workspace(), &Workspace::clientRemoved);
QSignalSpy windowAddedSpy(workspace(), &Workspace::windowAdded);
QSignalSpy windowRemovedSpy(workspace(), &Workspace::windowRemoved);
QSignalSpy activateSpy(InputMethod::self(), &InputMethod::activeChanged);
......@@ -223,13 +223,13 @@ void InputMethodTest::testEnableActive()
QVERIFY(!textInput.isNull());
textInput->enable(surface.data());
QVERIFY(surfaceConfigureRequestedSpy.wait());
QCOMPARE(clientAddedSpy.count(), 1);
QCOMPARE(windowAddedSpy.count(), 1);
// Show the keyboard
textInput->showInputPanel();
QVERIFY(clientAddedSpy.wait());
QVERIFY(windowAddedSpy.wait());
QCOMPARE(workspace()->activeClient(), client);
QCOMPARE(workspace()->activeWindow(), client);
activateSpy.clear();
textInput->enable(surface.get());
......@@ -253,9 +253,9 @@ void InputMethodTest::testHidePanel()
QVERIFY(!InputMethod::self()->isActive());
touchNow();
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
QSignalSpy clientRemovedSpy(workspace(), &Workspace::clientRemoved);
QVERIFY(clientAddedSpy.isValid());
QSignalSpy windowAddedSpy(workspace(), &Workspace::windowAdded);
QSignalSpy windowRemovedSpy(workspace(), &Workspace::windowRemoved);
QVERIFY(windowAddedSpy.isValid());