autotests: Prepend KWayland::Client:: to Surface
With a "Surface" type in kwin, KWayland::Client::Surface without fully specified namespace will conflict with kwin's Surface type. In some way, it also improves readability as it's clear where Surface comes from.
This commit is contained in:
parent
1d54231df1
commit
200223e06e
47 changed files with 430 additions and 430 deletions
|
@ -89,13 +89,13 @@ void ActivationTest::testSwitchToWindowToLeft()
|
|||
stackScreensHorizontally();
|
||||
|
||||
// Create several clients on the left screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client1);
|
||||
QVERIFY(client1->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
|
@ -105,13 +105,13 @@ void ActivationTest::testSwitchToWindowToLeft()
|
|||
client2->move(QPoint(500, 200));
|
||||
|
||||
// Create several clients on the right screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface3(Test::createXdgToplevelSurface(surface3.data()));
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client3);
|
||||
QVERIFY(client3->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface4(Test::createXdgToplevelSurface(surface4.data()));
|
||||
AbstractClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
|
@ -157,13 +157,13 @@ void ActivationTest::testSwitchToWindowToRight()
|
|||
stackScreensHorizontally();
|
||||
|
||||
// Create several clients on the left screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client1);
|
||||
QVERIFY(client1->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
|
@ -173,13 +173,13 @@ void ActivationTest::testSwitchToWindowToRight()
|
|||
client2->move(QPoint(500, 200));
|
||||
|
||||
// Create several clients on the right screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface3(Test::createXdgToplevelSurface(surface3.data()));
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client3);
|
||||
QVERIFY(client3->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface4(Test::createXdgToplevelSurface(surface4.data()));
|
||||
AbstractClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
|
@ -225,13 +225,13 @@ void ActivationTest::testSwitchToWindowAbove()
|
|||
stackScreensVertically();
|
||||
|
||||
// Create several clients on the top screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client1);
|
||||
QVERIFY(client1->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
|
@ -241,13 +241,13 @@ void ActivationTest::testSwitchToWindowAbove()
|
|||
client2->move(QPoint(200, 500));
|
||||
|
||||
// Create several clients on the bottom screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface3(Test::createXdgToplevelSurface(surface3.data()));
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client3);
|
||||
QVERIFY(client3->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface4(Test::createXdgToplevelSurface(surface4.data()));
|
||||
AbstractClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
|
@ -293,13 +293,13 @@ void ActivationTest::testSwitchToWindowBelow()
|
|||
stackScreensVertically();
|
||||
|
||||
// Create several clients on the top screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client1);
|
||||
QVERIFY(client1->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
|
@ -309,13 +309,13 @@ void ActivationTest::testSwitchToWindowBelow()
|
|||
client2->move(QPoint(200, 500));
|
||||
|
||||
// Create several clients on the bottom screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface3(Test::createXdgToplevelSurface(surface3.data()));
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client3);
|
||||
QVERIFY(client3->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface4(Test::createXdgToplevelSurface(surface4.data()));
|
||||
AbstractClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
|
@ -362,7 +362,7 @@ void ActivationTest::testSwitchToWindowMaximized()
|
|||
stackScreensHorizontally();
|
||||
|
||||
// Create several maximized clients on the left screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
QSignalSpy toplevelConfigureRequestedSpy1(shellSurface1.data(), &Test::XdgToplevel::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy1(shellSurface1->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
|
@ -378,7 +378,7 @@ void ActivationTest::testSwitchToWindowMaximized()
|
|||
Test::render(surface1.data(), toplevelConfigureRequestedSpy1.last().at(0).toSize(), Qt::red);
|
||||
QVERIFY(frameGeometryChangedSpy1.wait());
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
QSignalSpy toplevelConfigureRequestedSpy2(shellSurface2.data(), &Test::XdgToplevel::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy2(shellSurface2->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
|
@ -400,13 +400,13 @@ void ActivationTest::testSwitchToWindowMaximized()
|
|||
QCOMPARE(client2->maximizeMode(), MaximizeFull);
|
||||
|
||||
// Create several clients on the right screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface3(Test::createXdgToplevelSurface(surface3.data()));
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client3);
|
||||
QVERIFY(client3->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface4(Test::createXdgToplevelSurface(surface4.data()));
|
||||
AbstractClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
|
@ -449,7 +449,7 @@ void ActivationTest::testSwitchToWindowFullScreen()
|
|||
stackScreensVertically();
|
||||
|
||||
// Create several maximized clients on the top screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
QSignalSpy toplevelConfigureRequestedSpy1(shellSurface1.data(), &Test::XdgToplevel::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy1(shellSurface1->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
|
@ -465,7 +465,7 @@ void ActivationTest::testSwitchToWindowFullScreen()
|
|||
Test::render(surface1.data(), toplevelConfigureRequestedSpy1.last().at(0).toSize(), Qt::red);
|
||||
QVERIFY(frameGeometryChangedSpy1.wait());
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
QSignalSpy toplevelConfigureRequestedSpy2(shellSurface2.data(), &Test::XdgToplevel::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy2(shellSurface2->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
|
@ -487,13 +487,13 @@ void ActivationTest::testSwitchToWindowFullScreen()
|
|||
QVERIFY(client2->isFullScreen());
|
||||
|
||||
// Create several clients on the bottom screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface3(Test::createXdgToplevelSurface(surface3.data()));
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client3);
|
||||
QVERIFY(client3->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface4(Test::createXdgToplevelSurface(surface4.data()));
|
||||
AbstractClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
|
|
|
@ -43,7 +43,7 @@ void BufferSizeChangeTest::testShmBufferSizeChange()
|
|||
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
@ -74,13 +74,13 @@ void BufferSizeChangeTest::testShmBufferSizeChangeOnSubSurface()
|
|||
using namespace KWayland::Client;
|
||||
|
||||
// setup parent surface
|
||||
QScopedPointer<Surface> parentSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> parentSurface(Test::createSurface());
|
||||
QVERIFY(!parentSurface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(parentSurface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
||||
// setup sub surface
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<SubSurface> subSurface(Test::createSubSurface(surface.data(), parentSurface.data()));
|
||||
QVERIFY(!subSurface.isNull());
|
||||
|
@ -100,7 +100,7 @@ void BufferSizeChangeTest::testShmBufferSizeChangeOnSubSurface()
|
|||
QSignalSpy damagedParentSpy(parent, &AbstractClient::damaged);
|
||||
QVERIFY(damagedParentSpy.isValid());
|
||||
Test::render(surface.data(), QSize(20, 10), Qt::red);
|
||||
parentSurface->commit(Surface::CommitFlag::None);
|
||||
parentSurface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
QVERIFY(damagedParentSpy.wait());
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ void TestDbusInterface::testGetWindowInfoXdgShellClient()
|
|||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
shellSurface->set_title(QStringLiteral("Test window"));
|
||||
|
|
|
@ -310,7 +310,7 @@ void DebugConsoleTest::testWaylandClient()
|
|||
|
||||
// create the Surface and ShellSurface
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(surface->isValid());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -370,7 +370,7 @@ void DebugConsoleTest::testWaylandClient()
|
|||
QVERIFY(rowsRemovedSpy.isValid());
|
||||
|
||||
surface->attachBuffer(Buffer::Ptr());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(rowsRemovedSpy.wait());
|
||||
|
||||
QCOMPARE(rowsRemovedSpy.count(), 1);
|
||||
|
|
|
@ -95,7 +95,7 @@ AbstractClient *DecorationInputTest::showWindow()
|
|||
if (!QTest::qCompare(actual, expected, #actual, #expected, __FILE__, __LINE__))\
|
||||
return nullptr;
|
||||
|
||||
Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
VERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
VERIFY(shellSurface);
|
||||
|
|
|
@ -83,7 +83,7 @@ void DontCrashCancelAnimationFromAnimationEndedTest::testScript()
|
|||
|
||||
using namespace KWayland::Client;
|
||||
// create a window
|
||||
Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
|
|
@ -79,7 +79,7 @@ void DontCrashCursorPhysicalSizeEmpty::testMoveCursorOverDeco()
|
|||
// This test ensures that there is no endless recursion if the cursor theme cannot be created
|
||||
// a reason for creation failure could be physical size not existing
|
||||
// see BUG: 390314
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
Test::waylandServerSideDecoration()->create(surface.data(), surface.data());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ void DontCrashNoBorder::testCreateWindow()
|
|||
// create a window and ensure that this doesn't crash
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(shellSurface);
|
||||
|
|
|
@ -118,7 +118,7 @@ void DontCrashReinitializeCompositorTest::testReinitializeCompositor()
|
|||
// Create the test client.
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
|
|
@ -81,7 +81,7 @@ void TestDontCrashUseractionsMenu::cleanup()
|
|||
void TestDontCrashUseractionsMenu::testShowHideShowUseractionsMenu()
|
||||
{
|
||||
// this test creates the condition of BUG 382063
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
auto client = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
|
|
@ -110,7 +110,7 @@ void DesktopSwitchingAnimationTest::testSwitchDesktops()
|
|||
// The Fade Desktop effect will do nothing if there are no clients to fade,
|
||||
// so we have to create a dummy test client.
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
|
|
@ -88,7 +88,7 @@ void MaximizeAnimationTest::testMaximizeRestore()
|
|||
using namespace KWayland::Client;
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly));
|
||||
|
@ -98,7 +98,7 @@ void MaximizeAnimationTest::testMaximizeRestore()
|
|||
QSignalSpy toplevelConfigureRequestedSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
QVERIFY(surfaceConfigureRequestedSpy.wait());
|
||||
QCOMPARE(surfaceConfigureRequestedSpy.count(), 1);
|
||||
|
|
|
@ -111,7 +111,7 @@ void MinimizeAnimationTest::testMinimizeUnminimize()
|
|||
|
||||
// Create a panel at the top of the screen.
|
||||
const QRect panelRect = QRect(0, 0, 1280, 36);
|
||||
QScopedPointer<Surface> panelSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> panelSurface(Test::createSurface());
|
||||
QVERIFY(!panelSurface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> panelShellSurface(Test::createXdgToplevelSurface(panelSurface.data()));
|
||||
QVERIFY(!panelShellSurface.isNull());
|
||||
|
@ -128,7 +128,7 @@ void MinimizeAnimationTest::testMinimizeUnminimize()
|
|||
QCOMPARE(plasmaWindowCreatedSpy.count(), 1);
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
|
|
@ -100,7 +100,7 @@ void PopupOpenCloseAnimationTest::testAnimatePopups()
|
|||
|
||||
// Create the main window.
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> mainWindowSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> mainWindowSurface(Test::createSurface());
|
||||
QVERIFY(!mainWindowSurface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> mainWindowShellSurface(Test::createXdgToplevelSurface(mainWindowSurface.data()));
|
||||
QVERIFY(!mainWindowShellSurface.isNull());
|
||||
|
@ -117,7 +117,7 @@ void PopupOpenCloseAnimationTest::testAnimatePopups()
|
|||
QVERIFY(!effect->isActive());
|
||||
|
||||
// Create a popup, it should be animated.
|
||||
QScopedPointer<Surface> popupSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> popupSurface(Test::createSurface());
|
||||
QVERIFY(!popupSurface.isNull());
|
||||
QScopedPointer<Test::XdgPositioner> positioner(Test::createXdgPositioner());
|
||||
positioner->set_size(20, 20);
|
||||
|
@ -162,7 +162,7 @@ void PopupOpenCloseAnimationTest::testAnimateUserActionsPopup()
|
|||
|
||||
// Create the test client.
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -214,7 +214,7 @@ void PopupOpenCloseAnimationTest::testAnimateDecorationTooltips()
|
|||
|
||||
// Create the test client.
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
|
|
@ -489,7 +489,7 @@ void ScriptedEffectsTest::testGrab()
|
|||
|
||||
// create test client
|
||||
using namespace KWayland::Client;
|
||||
Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -522,7 +522,7 @@ void ScriptedEffectsTest::testGrabAlreadyGrabbedWindow()
|
|||
|
||||
// create test client
|
||||
using namespace KWayland::Client;
|
||||
Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -559,7 +559,7 @@ void ScriptedEffectsTest::testGrabAlreadyGrabbedWindowForced()
|
|||
|
||||
// create test client
|
||||
using namespace KWayland::Client;
|
||||
Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -590,7 +590,7 @@ void ScriptedEffectsTest::testUngrab()
|
|||
|
||||
// create test client
|
||||
using namespace KWayland::Client;
|
||||
Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -633,7 +633,7 @@ void ScriptedEffectsTest::testRedirect()
|
|||
|
||||
// create test client
|
||||
using namespace KWayland::Client;
|
||||
Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -711,7 +711,7 @@ void ScriptedEffectsTest::testComplete()
|
|||
|
||||
// create test client
|
||||
using namespace KWayland::Client;
|
||||
Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
|
|
@ -318,7 +318,7 @@ void SlidingPopupsTest::testWithOtherEffectWayland()
|
|||
QVERIFY(slideManager);
|
||||
|
||||
// create Wayland window
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(surface);
|
||||
QScopedPointer<Slide> slide(slideManager->createSlide(surface.data()));
|
||||
slide->setLocation(Slide::Location::Left);
|
||||
|
|
|
@ -119,7 +119,7 @@ void ToplevelOpenCloseAnimationTest::testAnimateToplevels()
|
|||
|
||||
// Create the test client.
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -163,7 +163,7 @@ void ToplevelOpenCloseAnimationTest::testDontAnimatePopups()
|
|||
|
||||
// Create the main window.
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> mainWindowSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> mainWindowSurface(Test::createSurface());
|
||||
QVERIFY(!mainWindowSurface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> mainWindowShellSurface(Test::createXdgToplevelSurface(mainWindowSurface.data()));
|
||||
QVERIFY(!mainWindowShellSurface.isNull());
|
||||
|
@ -180,7 +180,7 @@ void ToplevelOpenCloseAnimationTest::testDontAnimatePopups()
|
|||
QVERIFY(!effect->isActive());
|
||||
|
||||
// Create a popup, it should not be animated.
|
||||
QScopedPointer<Surface> popupSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> popupSurface(Test::createSurface());
|
||||
QVERIFY(!popupSurface.isNull());
|
||||
QScopedPointer<Test::XdgPositioner> positioner(Test::createXdgPositioner());
|
||||
QVERIFY(positioner);
|
||||
|
|
|
@ -236,7 +236,7 @@ void GlobalShortcutsTest::testUserActionsMenu()
|
|||
// https://github.com/xkbcommon/libxkbcommon/issues/17
|
||||
|
||||
// first create a window
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
|
@ -378,7 +378,7 @@ void GlobalShortcutsTest::testX11ClientShortcut()
|
|||
|
||||
void GlobalShortcutsTest::testWaylandClientShortcut()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
|
||||
|
@ -416,7 +416,7 @@ void GlobalShortcutsTest::testSetupWindowShortcut()
|
|||
{
|
||||
// QTBUG-62102
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ void TestIdleInhibition::testInhibit()
|
|||
QVERIFY(inhibitedSpy.isValid());
|
||||
|
||||
// now create window
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
||||
// now create inhibition on window
|
||||
|
@ -123,7 +123,7 @@ void TestIdleInhibition::testDontInhibitWhenNotOnCurrentDesktop()
|
|||
QVERIFY(inhibitedSpy.isValid());
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -180,7 +180,7 @@ void TestIdleInhibition::testDontInhibitWhenMinimized()
|
|||
QVERIFY(inhibitedSpy.isValid());
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -227,7 +227,7 @@ void TestIdleInhibition::testDontInhibitWhenUnmapped()
|
|||
QVERIFY(inhibitedSpy.isValid());
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -259,7 +259,7 @@ void TestIdleInhibition::testDontInhibitWhenUnmapped()
|
|||
|
||||
// Unmap the client.
|
||||
surface->attachBuffer(Buffer::Ptr());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(Test::waitForWindowDestroyed(client));
|
||||
|
||||
// The surface is no longer visible, so the compositor doesn't have to honor the
|
||||
|
@ -268,7 +268,7 @@ void TestIdleInhibition::testDontInhibitWhenUnmapped()
|
|||
QCOMPARE(inhibitedSpy.count(), 2);
|
||||
|
||||
// Tell the compositor that we want to map the surface.
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// The compositor will respond with a configure event.
|
||||
QVERIFY(surfaceConfigureRequestedSpy.wait());
|
||||
|
@ -310,7 +310,7 @@ void TestIdleInhibition::testDontInhibitWhenLeftCurrentDesktop()
|
|||
QVERIFY(inhibitedSpy.isValid());
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
|
|
@ -107,7 +107,7 @@ void InputStackingOrderTest::testPointerFocusUpdatesOnStackingOrderChange()
|
|||
// now create the two windows and make them overlap
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface1 = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *surface1 = Test::createSurface(Test::waylandCompositor());
|
||||
QVERIFY(surface1);
|
||||
Test::XdgToplevel *shellSurface1 = Test::createXdgToplevelSurface(surface1, surface1);
|
||||
QVERIFY(shellSurface1);
|
||||
|
@ -116,7 +116,7 @@ void InputStackingOrderTest::testPointerFocusUpdatesOnStackingOrderChange()
|
|||
AbstractClient *window1 = workspace()->activeClient();
|
||||
QVERIFY(window1);
|
||||
|
||||
Surface *surface2 = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *surface2 = Test::createSurface(Test::waylandCompositor());
|
||||
QVERIFY(surface2);
|
||||
Test::XdgToplevel *shellSurface2 = Test::createXdgToplevelSurface(surface2, surface2);
|
||||
QVERIFY(shellSurface2);
|
||||
|
|
|
@ -111,7 +111,7 @@ void InputMethodTest::testOpenClose()
|
|||
QVERIFY(clientAddedSpy.isValid());
|
||||
|
||||
// Create an xdg_toplevel surface and wait for the compositor to catch up.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::red);
|
||||
QVERIFY(client);
|
||||
|
@ -161,7 +161,7 @@ void InputMethodTest::testOpenClose()
|
|||
void InputMethodTest::testEnableDisableV3()
|
||||
{
|
||||
// Create an xdg_toplevel surface and wait for the compositor to catch up.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::red);
|
||||
QVERIFY(client);
|
||||
|
@ -198,7 +198,7 @@ void InputMethodTest::testEnableActive()
|
|||
QSignalSpy activateSpy(InputMethod::self(), &InputMethod::activeChanged);
|
||||
|
||||
// Create an xdg_toplevel surface and wait for the compositor to catch up.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::red);
|
||||
QVERIFY(client);
|
||||
|
@ -253,7 +253,7 @@ void InputMethodTest::testHidePanel()
|
|||
QVERIFY(clientAddedSpy.wait());
|
||||
|
||||
// Create an xdg_toplevel surface and wait for the compositor to catch up.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::red);
|
||||
waylandServer()->seat()->setFocusedTextInputSurface(client->surface());
|
||||
|
@ -293,7 +293,7 @@ void InputMethodTest::testSwitchFocusedSurfaces()
|
|||
QVERIFY(clientAddedSpy.wait(10000));
|
||||
|
||||
QVector<AbstractClient *> clients;
|
||||
QVector<Surface *> surfaces;
|
||||
QVector<KWayland::Client::Surface *> surfaces;
|
||||
QVector<Test::XdgToplevel *> toplevels;
|
||||
// We create 3 surfaces
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
|
|
|
@ -379,7 +379,7 @@ void InternalWindowTest::testKeyboardTriggersLeave()
|
|||
QVERIFY(enteredSpy.isValid());
|
||||
QSignalSpy leftSpy(keyboard.data(), &Keyboard::left);
|
||||
QVERIFY(leftSpy.isValid());
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
||||
// now let's render
|
||||
|
|
|
@ -402,7 +402,7 @@ void KeyboardLayoutTest::testWindowPolicy()
|
|||
|
||||
// create a window
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto c1 = Test::renderAndWaitForShown(surface.data(), QSize(100, 100), Qt::blue);
|
||||
QVERIFY(c1);
|
||||
|
@ -413,7 +413,7 @@ void KeyboardLayoutTest::testWindowPolicy()
|
|||
QCOMPARE(xkb->layoutName(), QStringLiteral("German"));
|
||||
|
||||
// create a second window
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
auto c2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 100), Qt::red);
|
||||
QVERIFY(c2);
|
||||
|
@ -444,14 +444,14 @@ void KeyboardLayoutTest::testApplicationPolicy()
|
|||
|
||||
// create a window
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
auto c1 = Test::renderAndWaitForShown(surface.data(), QSize(100, 100), Qt::blue);
|
||||
QVERIFY(c1);
|
||||
|
||||
// create a second window
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
shellSurface2->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
auto c2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 100), Qt::red);
|
||||
|
|
|
@ -74,16 +74,16 @@ void KWinBindingsTest::cleanup()
|
|||
void KWinBindingsTest::testSwitchWindow()
|
||||
{
|
||||
// first create windows
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
auto c1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
auto c2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface3(Test::createXdgToplevelSurface(surface3.data()));
|
||||
auto c3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface4(Test::createXdgToplevelSurface(surface4.data()));
|
||||
auto c4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
|
||||
|
@ -134,16 +134,16 @@ void KWinBindingsTest::testSwitchWindowScript()
|
|||
QVERIFY(Scripting::self());
|
||||
|
||||
// first create windows
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
auto c1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
auto c2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface3(Test::createXdgToplevelSurface(surface3.data()));
|
||||
auto c3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface4(Test::createXdgToplevelSurface(surface4.data()));
|
||||
auto c4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
|
||||
|
@ -217,7 +217,7 @@ void KWinBindingsTest::testWindowToDesktop()
|
|||
VirtualDesktopManager::self()->setCurrent(VirtualDesktopManager::self()->desktops().first());
|
||||
|
||||
// now create a window
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QSignalSpy desktopChangedSpy(c, &AbstractClient::desktopChanged);
|
||||
|
|
|
@ -155,7 +155,7 @@ AbstractClient *LockScreenTest::showWindow()
|
|||
if (!QTest::qCompare(actual, expected, #actual, #expected, __FILE__, __LINE__))\
|
||||
return nullptr;
|
||||
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
VERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
VERIFY(shellSurface);
|
||||
|
|
|
@ -93,7 +93,7 @@ void TestMaximized::testMaximizedPassedToDeco()
|
|||
// this test verifies that when a XdgShellClient gets maximized the Decoration receives the signal
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QScopedPointer<ServerSideDecoration> ssd(Test::waylandServerSideDecoration()->create(surface.data()));
|
||||
|
||||
|
@ -178,7 +178,7 @@ void TestMaximized::testInitiallyMaximizedBorderless()
|
|||
QCOMPARE(options->borderlessMaximizedWindows(), true);
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(
|
||||
Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
QScopedPointer<Test::XdgToplevelDecorationV1> decoration(Test::createXdgToplevelDecorationV1(shellSurface.data()));
|
||||
|
@ -188,7 +188,7 @@ void TestMaximized::testInitiallyMaximizedBorderless()
|
|||
shellSurface->set_maximized();
|
||||
QSignalSpy decorationConfigureRequestedSpy(decoration.data(), &Test::XdgToplevelDecorationV1::configureRequested);
|
||||
decoration->set_mode(Test::XdgToplevelDecorationV1::mode_server_side);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// Wait for the initial configure event.
|
||||
Test::XdgToplevel::States states;
|
||||
|
@ -229,7 +229,7 @@ void TestMaximized::testBorderlessMaximizedWindow()
|
|||
QCOMPARE(options->borderlessMaximizedWindows(), true);
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(
|
||||
Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
QScopedPointer<Test::XdgToplevelDecorationV1> decoration(Test::createXdgToplevelDecorationV1(shellSurface.data()));
|
||||
|
@ -238,7 +238,7 @@ void TestMaximized::testBorderlessMaximizedWindow()
|
|||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
QSignalSpy decorationConfigureRequestedSpy(decoration.data(), &Test::XdgToplevelDecorationV1::configureRequested);
|
||||
decoration->set_mode(Test::XdgToplevelDecorationV1::mode_server_side);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// Wait for the initial configure event.
|
||||
Test::XdgToplevel::States states;
|
||||
|
@ -310,10 +310,10 @@ void TestMaximized::testBorderlessMaximizedWindow()
|
|||
void TestMaximized::testMaximizedGainFocusAndBeActivated()
|
||||
{
|
||||
// This test verifies that a window will be raised and gain focus when it's maximized
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> xdgShellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> xdgShellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
auto client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ void MoveResizeWindowTest::testMove()
|
|||
{
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
@ -191,7 +191,7 @@ void MoveResizeWindowTest::testResize()
|
|||
// a test case which manually resizes a window
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(
|
||||
|
@ -204,7 +204,7 @@ void MoveResizeWindowTest::testResize()
|
|||
QVERIFY(toplevelConfigureRequestedSpy.isValid());
|
||||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
QVERIFY(surfaceConfigureRequestedSpy.isValid());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(surfaceConfigureRequestedSpy.wait());
|
||||
QCOMPARE(surfaceConfigureRequestedSpy.count(), 1);
|
||||
QCOMPARE(toplevelConfigureRequestedSpy.count(), 1);
|
||||
|
@ -333,7 +333,7 @@ void MoveResizeWindowTest::testPackTo()
|
|||
{
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
@ -371,13 +371,13 @@ void MoveResizeWindowTest::testPackAgainstClient()
|
|||
{
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QVERIFY(!surface1.isNull());
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QVERIFY(!surface2.isNull());
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QVERIFY(!surface3.isNull());
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface4(Test::createSurface());
|
||||
QVERIFY(!surface4.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
|
@ -388,7 +388,7 @@ void MoveResizeWindowTest::testPackAgainstClient()
|
|||
QVERIFY(!shellSurface3.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface4(Test::createXdgToplevelSurface(surface4.data()));
|
||||
QVERIFY(!shellSurface4.isNull());
|
||||
auto renderWindow = [] (Surface *surface, const QString &methodCall, const QRect &expectedGeometry) {
|
||||
auto renderWindow = [] (KWayland::Client::Surface *surface, const QString &methodCall, const QRect &expectedGeometry) {
|
||||
// let's render
|
||||
auto c = Test::renderAndWaitForShown(surface, QSize(10, 10), Qt::blue);
|
||||
|
||||
|
@ -406,7 +406,7 @@ void MoveResizeWindowTest::testPackAgainstClient()
|
|||
renderWindow(surface3.data(), QStringLiteral("slotWindowPackRight"), QRect(1270, 507, 10, 10));
|
||||
renderWindow(surface4.data(), QStringLiteral("slotWindowPackDown"), QRect(635, 1014, 10, 10));
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -439,7 +439,7 @@ void MoveResizeWindowTest::testGrowShrink()
|
|||
using namespace KWayland::Client;
|
||||
|
||||
// block geometry helper
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QVERIFY(!surface1.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
QVERIFY(!shellSurface1.isNull());
|
||||
|
@ -448,7 +448,7 @@ void MoveResizeWindowTest::testGrowShrink()
|
|||
workspace()->slotWindowPackRight();
|
||||
workspace()->slotWindowPackDown();
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
@ -501,7 +501,7 @@ void MoveResizeWindowTest::testPointerMoveEnd()
|
|||
// this test verifies that moving a window through pointer only ends if all buttons are released
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
@ -547,7 +547,7 @@ void MoveResizeWindowTest::testClientSideMove()
|
|||
QSignalSpy buttonSpy(pointer.data(), &Pointer::buttonStateChanged);
|
||||
QVERIFY(buttonSpy.isValid());
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
|
@ -602,7 +602,7 @@ void MoveResizeWindowTest::testPlasmaShellSurfaceMovable()
|
|||
{
|
||||
// this test verifies that certain window types from PlasmaShellSurface are not moveable or resizable
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
@ -753,7 +753,7 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingX11Panel()
|
|||
|
||||
// let's create a window
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
@ -817,7 +817,7 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingWaylandPanel()
|
|||
|
||||
// first create our panel
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> panelSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> panelSurface(Test::createSurface());
|
||||
QVERIFY(!panelSurface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> panelShellSurface(Test::createXdgToplevelSurface(panelSurface.data()));
|
||||
QVERIFY(!panelShellSurface.isNull());
|
||||
|
@ -834,7 +834,7 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingWaylandPanel()
|
|||
QVERIFY(panel->isDock());
|
||||
|
||||
// let's create a window
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
@ -879,7 +879,7 @@ void MoveResizeWindowTest::testResizeForVirtualKeyboard()
|
|||
{
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
@ -924,7 +924,7 @@ void MoveResizeWindowTest::testResizeForVirtualKeyboardWithMaximize()
|
|||
{
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
@ -977,7 +977,7 @@ void MoveResizeWindowTest::testResizeForVirtualKeyboardWithFullScreen()
|
|||
{
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
@ -1032,7 +1032,7 @@ void MoveResizeWindowTest::testDestroyMoveClient()
|
|||
|
||||
// Create the test client.
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -1069,7 +1069,7 @@ void MoveResizeWindowTest::testDestroyResizeClient()
|
|||
|
||||
// Create the test client.
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -1104,7 +1104,7 @@ void MoveResizeWindowTest::testSetFullScreenWhenMoving()
|
|||
// Ensure we disable moving event when setFullScreen is triggered
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
@ -1130,7 +1130,7 @@ void MoveResizeWindowTest::testSetMaximizeWhenMoving()
|
|||
// Ensure we disable moving event when changeMaximize is triggered
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
|
|
@ -90,12 +90,12 @@ void TestOutputManagement::testOutputDeviceDisabled()
|
|||
// This tests checks that OutputConfiguration::apply aka Platform::requestOutputsChange works as expected
|
||||
// when disabling and enabling virtual OutputDevice
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto size = QSize(200,200);
|
||||
|
||||
QSignalSpy outputEnteredSpy(surface.data(), &Surface::outputEntered);
|
||||
QSignalSpy outputLeftSpy(surface.data(), &Surface::outputLeft);
|
||||
QSignalSpy outputEnteredSpy(surface.data(), &KWayland::Client::Surface::outputEntered);
|
||||
QSignalSpy outputLeftSpy(surface.data(), &KWayland::Client::Surface::outputLeft);
|
||||
|
||||
QSignalSpy outputEnabledSpy(kwinApp()->platform(), &Platform::outputEnabled);
|
||||
QSignalSpy outputDisabledSpy(kwinApp()->platform(), &Platform::outputDisabled);
|
||||
|
@ -177,12 +177,12 @@ void TestOutputManagement::testOutputDeviceRemoved()
|
|||
// This tests checks that OutputConfiguration::apply aka Platform::requestOutputsChange works as expected
|
||||
// when removing a virtual OutputDevice
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto size = QSize(200,200);
|
||||
|
||||
QSignalSpy outputEnteredSpy(surface.data(), &Surface::outputEntered);
|
||||
QSignalSpy outputLeftSpy(surface.data(), &Surface::outputLeft);
|
||||
QSignalSpy outputEnteredSpy(surface.data(), &KWayland::Client::Surface::outputEntered);
|
||||
QSignalSpy outputLeftSpy(surface.data(), &KWayland::Client::Surface::outputLeft);
|
||||
|
||||
QSignalSpy outputEnabledSpy(kwinApp()->platform(), &Platform::outputEnabled);
|
||||
QSignalSpy outputDisabledSpy(kwinApp()->platform(), &Platform::outputDisabled);
|
||||
|
|
|
@ -113,7 +113,7 @@ PlaceWindowResult TestPlacement::createAndPlaceWindow(const QSize &defaultSize,
|
|||
|
||||
QSignalSpy toplevelConfigureRequestedSpy(shellSurface, &Test::XdgToplevel::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
surfaceConfigureRequestedSpy.wait();
|
||||
|
||||
rc.initiallyConfiguredSize = toplevelConfigureRequestedSpy[0][0].toSize();
|
||||
|
@ -176,7 +176,7 @@ void TestPlacement::testPlaceMaximized()
|
|||
setPlacementPolicy(Placement::Maximizing);
|
||||
|
||||
// add a top panel
|
||||
QScopedPointer<Surface> panelSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> panelSurface(Test::createSurface());
|
||||
QScopedPointer<QObject> panelShellSurface(Test::createXdgToplevelSurface(panelSurface.data()));
|
||||
QScopedPointer<PlasmaShellSurface> plasmaSurface(Test::waylandPlasmaShell()->createSurface(panelSurface.data()));
|
||||
plasmaSurface->setRole(PlasmaShellSurface::Role::Panel);
|
||||
|
@ -199,7 +199,7 @@ void TestPlacement::testPlaceMaximizedLeavesFullscreen()
|
|||
setPlacementPolicy(Placement::Maximizing);
|
||||
|
||||
// add a top panel
|
||||
QScopedPointer<Surface> panelSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> panelSurface(Test::createSurface());
|
||||
QScopedPointer<QObject> panelShellSurface(Test::createXdgToplevelSurface(panelSurface.data()));
|
||||
QScopedPointer<PlasmaShellSurface> plasmaSurface(Test::waylandPlasmaShell()->createSurface(panelSurface.data()));
|
||||
plasmaSurface->setRole(PlasmaShellSurface::Role::Panel);
|
||||
|
@ -215,7 +215,7 @@ void TestPlacement::testPlaceMaximizedLeavesFullscreen()
|
|||
shellSurface->set_fullscreen(nullptr);
|
||||
QSignalSpy toplevelConfigureRequestedSpy(shellSurface, &Test::XdgToplevel::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(surfaceConfigureRequestedSpy.wait());
|
||||
|
||||
auto initiallyConfiguredSize = toplevelConfigureRequestedSpy[0][0].toSize();
|
||||
|
@ -239,7 +239,7 @@ void TestPlacement::testPlaceCentered()
|
|||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(client);
|
||||
|
@ -261,7 +261,7 @@ void TestPlacement::testPlaceUnderMouse()
|
|||
KWin::Cursors::self()->mouse()->setPos(QPoint(200, 300));
|
||||
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), QPoint(200, 300));
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(client);
|
||||
|
@ -280,21 +280,21 @@ void TestPlacement::testPlaceCascaded()
|
|||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(client1);
|
||||
QCOMPARE(client1->pos(), QPoint(0, 0));
|
||||
QCOMPARE(client1->size(), QSize(100, 50));
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
QCOMPARE(client2->pos(), client1->pos() + workspace()->cascadeOffset(client2));
|
||||
QCOMPARE(client2->size(), QSize(100, 50));
|
||||
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface3(Test::createXdgToplevelSurface(surface3.data()));
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::green);
|
||||
QVERIFY(client3);
|
||||
|
@ -318,20 +318,20 @@ void TestPlacement::testPlaceRandom()
|
|||
group.sync();
|
||||
workspace()->slotReconfigure();
|
||||
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(client1);
|
||||
QCOMPARE(client1->size(), QSize(100, 50));
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
QVERIFY(client2->pos() != client1->pos());
|
||||
QCOMPARE(client2->size(), QSize(100, 50));
|
||||
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface3(Test::createXdgToplevelSurface(surface3.data()));
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::green);
|
||||
QVERIFY(client3);
|
||||
|
@ -352,7 +352,7 @@ void TestPlacement::testFullscreen()
|
|||
const QVector<AbstractOutput *> outputs = kwinApp()->platform()->enabledOutputs();
|
||||
|
||||
setPlacementPolicy(Placement::Smart);
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
|
|
|
@ -99,7 +99,7 @@ void PlasmaSurfaceTest::testRoleOnAllDesktops_data()
|
|||
void PlasmaSurfaceTest::testRoleOnAllDesktops()
|
||||
{
|
||||
// this test verifies that a XdgShellClient is set on all desktops when the role changes
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -125,7 +125,7 @@ void PlasmaSurfaceTest::testRoleOnAllDesktops()
|
|||
|
||||
// let's create a second window where we init a little bit different
|
||||
// first creating the PlasmaSurface then the Shell Surface
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QVERIFY(!surface2.isNull());
|
||||
QScopedPointer<PlasmaShellSurface> plasmaSurface2(m_plasmaShell->createSurface(surface2.data()));
|
||||
QVERIFY(!plasmaSurface2.isNull());
|
||||
|
@ -157,7 +157,7 @@ void PlasmaSurfaceTest::testAcceptsFocus_data()
|
|||
void PlasmaSurfaceTest::testAcceptsFocus()
|
||||
{
|
||||
// this test verifies that some surface roles don't get focus
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -176,7 +176,7 @@ void PlasmaSurfaceTest::testAcceptsFocus()
|
|||
|
||||
void PlasmaSurfaceTest::testOSDPlacement()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -219,7 +219,7 @@ void PlasmaSurfaceTest::testOSDPlacement()
|
|||
|
||||
void PlasmaSurfaceTest::testOSDPlacementManualPosition()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<PlasmaShellSurface> plasmaSurface(m_plasmaShell->createSurface(surface.data()));
|
||||
QVERIFY(!plasmaSurface.isNull());
|
||||
|
@ -256,7 +256,7 @@ void PlasmaSurfaceTest::testPanelTypeHasStrut_data()
|
|||
|
||||
void PlasmaSurfaceTest::testPanelTypeHasStrut()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<QObject> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -307,7 +307,7 @@ void PlasmaSurfaceTest::testPanelWindowsCanCover()
|
|||
{
|
||||
// this test verifies the behavior of a panel with windows can cover
|
||||
// triggering the screen edge should raise the panel.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -334,7 +334,7 @@ void PlasmaSurfaceTest::testPanelWindowsCanCover()
|
|||
QCOMPARE(panel->layer(), KWin::NormalLayer);
|
||||
|
||||
// create a Window
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QVERIFY(!surface2.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
QVERIFY(!shellSurface2.isNull());
|
||||
|
@ -378,7 +378,7 @@ void PlasmaSurfaceTest::testPanelActivate_data()
|
|||
|
||||
void PlasmaSurfaceTest::testPanelActivate()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
|
|
@ -229,7 +229,7 @@ void PlasmaWindowTest::testPopupWindowNoPlasmaWindow()
|
|||
QVERIFY(plasmaWindowCreatedSpy.isValid());
|
||||
|
||||
// first create the parent window
|
||||
QScopedPointer<Surface> parentSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> parentSurface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> parentShellSurface(Test::createXdgToplevelSurface(parentSurface.data()));
|
||||
AbstractClient *parentClient = Test::renderAndWaitForShown(parentSurface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(parentClient);
|
||||
|
@ -242,7 +242,7 @@ void PlasmaWindowTest::testPopupWindowNoPlasmaWindow()
|
|||
positioner->set_anchor_rect(0, 0, 10, 10);
|
||||
positioner->set_anchor(Test::XdgPositioner::anchor_bottom_right);
|
||||
positioner->set_gravity(Test::XdgPositioner::gravity_bottom_right);
|
||||
QScopedPointer<Surface> popupSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> popupSurface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgPopup> popupShellSurface(Test::createXdgPopupSurface(popupSurface.data(), parentShellSurface->xdgSurface(), positioner.data()));
|
||||
AbstractClient *popupClient = Test::renderAndWaitForShown(popupSurface.data(), QSize(10, 10), Qt::blue);
|
||||
QVERIFY(popupClient);
|
||||
|
@ -296,7 +296,7 @@ void PlasmaWindowTest::testDestroyedButNotUnmapped()
|
|||
QVERIFY(plasmaWindowCreatedSpy.isValid());
|
||||
|
||||
// first create the parent window
|
||||
QScopedPointer<Surface> parentSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> parentSurface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> parentShellSurface(Test::createXdgToplevelSurface(parentSurface.data()));
|
||||
// map that window
|
||||
Test::render(parentSurface.data(), QSize(100, 50), Qt::blue);
|
||||
|
|
|
@ -116,7 +116,7 @@ void TestPointerConstraints::testConfinedPointer()
|
|||
{
|
||||
// this test sets up a Surface with a confined pointer
|
||||
// simple interaction test to verify that the pointer gets confined
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QScopedPointer<Pointer> pointer(Test::waylandSeat()->createPointer());
|
||||
QScopedPointer<ConfinedPointer> confinedPointer(Test::waylandPointerConstraints()->confinePointer(surface.data(), pointer.data(), nullptr, PointerConstraints::LifeTime::OneShot));
|
||||
|
@ -223,7 +223,7 @@ void TestPointerConstraints::testConfinedPointer()
|
|||
QCOMPARE(input()->pointer()->isConstrained(), true);
|
||||
|
||||
// create a second window and move it above our constrained window
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
auto c2 = Test::renderAndWaitForShown(surface2.data(), QSize(1280, 1024), Qt::blue);
|
||||
QVERIFY(c2);
|
||||
|
@ -236,12 +236,12 @@ void TestPointerConstraints::testConfinedPointer()
|
|||
// let's set a region which results in unconfined
|
||||
auto r = Test::waylandCompositor()->createRegion(QRegion(2, 2, 3, 3));
|
||||
confinedPointer->setRegion(r.get());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(unconfinedSpy2.wait());
|
||||
QCOMPARE(input()->pointer()->isConstrained(), false);
|
||||
// and set a full region again, that should confine
|
||||
confinedPointer->setRegion(nullptr);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(confinedSpy2.wait());
|
||||
QCOMPARE(input()->pointer()->isConstrained(), true);
|
||||
|
||||
|
@ -275,7 +275,7 @@ void TestPointerConstraints::testLockedPointer()
|
|||
// this test sets up a Surface with a locked pointer
|
||||
// simple interaction test to verify that the pointer gets locked
|
||||
// the various ways to unlock are not tested as that's already verified by testConfinedPointer
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QScopedPointer<Pointer> pointer(Test::waylandSeat()->createPointer());
|
||||
QScopedPointer<LockedPointer> lockedPointer(Test::waylandPointerConstraints()->lockPointer(surface.data(), pointer.data(), nullptr, PointerConstraints::LifeTime::OneShot));
|
||||
|
@ -341,7 +341,7 @@ void TestPointerConstraints::testLockedPointer()
|
|||
void TestPointerConstraints::testCloseWindowWithLockedPointer()
|
||||
{
|
||||
// test case which verifies that the pointer gets unlocked when the window for it gets closed
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QScopedPointer<Pointer> pointer(Test::waylandSeat()->createPointer());
|
||||
QScopedPointer<LockedPointer> lockedPointer(Test::waylandPointerConstraints()->lockPointer(surface.data(), pointer.data(), nullptr, PointerConstraints::LifeTime::OneShot));
|
||||
|
|
|
@ -198,7 +198,7 @@ void PointerInputTest::testWarpingUpdatesFocus()
|
|||
// create a window
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -246,7 +246,7 @@ void PointerInputTest::testWarpingGeneratesPointerMotion()
|
|||
// create a window
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -286,7 +286,7 @@ void PointerInputTest::testWarpingDuringFilter()
|
|||
// create a window
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -329,7 +329,7 @@ void PointerInputTest::testUpdateFocusAfterScreenChange()
|
|||
// create a window
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -433,7 +433,7 @@ void PointerInputTest::testModifierClickUnrestrictedMove()
|
|||
// create a window
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -500,7 +500,7 @@ void PointerInputTest::testModifierClickUnrestrictedMoveGlobalShortcutsDisabled(
|
|||
// create a window
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -573,7 +573,7 @@ void PointerInputTest::testModifierScrollOpacity()
|
|||
// create a window
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -632,7 +632,7 @@ void PointerInputTest::testModifierScrollOpacityGlobalShortcutsDisabled()
|
|||
// create a window
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -682,7 +682,7 @@ void PointerInputTest::testScrollAction()
|
|||
// create two windows
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface1 = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface1 = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface1);
|
||||
Test::XdgToplevel *shellSurface1 = Test::createXdgToplevelSurface(surface1, surface1);
|
||||
QVERIFY(shellSurface1);
|
||||
|
@ -690,7 +690,7 @@ void PointerInputTest::testScrollAction()
|
|||
QVERIFY(clientAddedSpy.wait());
|
||||
AbstractClient *window1 = workspace()->activeClient();
|
||||
QVERIFY(window1);
|
||||
Surface *surface2 = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface2 = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface2);
|
||||
Test::XdgToplevel *shellSurface2 = Test::createXdgToplevelSurface(surface2, surface2);
|
||||
QVERIFY(shellSurface2);
|
||||
|
@ -742,7 +742,7 @@ void PointerInputTest::testFocusFollowsMouse()
|
|||
// create two windows
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface1 = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface1 = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface1);
|
||||
Test::XdgToplevel *shellSurface1 = Test::createXdgToplevelSurface(surface1, surface1);
|
||||
QVERIFY(shellSurface1);
|
||||
|
@ -750,7 +750,7 @@ void PointerInputTest::testFocusFollowsMouse()
|
|||
QVERIFY(clientAddedSpy.wait());
|
||||
AbstractClient *window1 = workspace()->activeClient();
|
||||
QVERIFY(window1);
|
||||
Surface *surface2 = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface2 = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface2);
|
||||
Test::XdgToplevel *shellSurface2 = Test::createXdgToplevelSurface(surface2, surface2);
|
||||
QVERIFY(shellSurface2);
|
||||
|
@ -828,7 +828,7 @@ void PointerInputTest::testMouseActionInactiveWindow()
|
|||
// create two windows
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface1 = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface1 = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface1);
|
||||
Test::XdgToplevel *shellSurface1 = Test::createXdgToplevelSurface(surface1, surface1);
|
||||
QVERIFY(shellSurface1);
|
||||
|
@ -836,7 +836,7 @@ void PointerInputTest::testMouseActionInactiveWindow()
|
|||
QVERIFY(clientAddedSpy.wait());
|
||||
AbstractClient *window1 = workspace()->activeClient();
|
||||
QVERIFY(window1);
|
||||
Surface *surface2 = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface2 = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface2);
|
||||
Test::XdgToplevel *shellSurface2 = Test::createXdgToplevelSurface(surface2, surface2);
|
||||
QVERIFY(shellSurface2);
|
||||
|
@ -918,7 +918,7 @@ void PointerInputTest::testMouseActionActiveWindow()
|
|||
// create two windows
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface1 = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface1 = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface1);
|
||||
Test::XdgToplevel *shellSurface1 = Test::createXdgToplevelSurface(surface1, surface1);
|
||||
QVERIFY(shellSurface1);
|
||||
|
@ -928,7 +928,7 @@ void PointerInputTest::testMouseActionActiveWindow()
|
|||
QVERIFY(window1);
|
||||
QSignalSpy window1DestroyedSpy(window1, &QObject::destroyed);
|
||||
QVERIFY(window1DestroyedSpy.isValid());
|
||||
Surface *surface2 = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface2 = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface2);
|
||||
Test::XdgToplevel *shellSurface2 = Test::createXdgToplevelSurface(surface2, surface2);
|
||||
QVERIFY(shellSurface2);
|
||||
|
@ -1000,7 +1000,7 @@ void PointerInputTest::testCursorImage()
|
|||
// create a window
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -1016,9 +1016,9 @@ void PointerInputTest::testCursorImage()
|
|||
QVERIFY(enteredSpy.wait());
|
||||
|
||||
// create a cursor on the pointer
|
||||
Surface *cursorSurface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *cursorSurface = Test::createSurface(m_compositor);
|
||||
QVERIFY(cursorSurface);
|
||||
QSignalSpy cursorRenderedSpy(cursorSurface, &Surface::frameRendered);
|
||||
QSignalSpy cursorRenderedSpy(cursorSurface, &KWayland::Client::Surface::frameRendered);
|
||||
QVERIFY(cursorRenderedSpy.isValid());
|
||||
QImage red = QImage(QSize(10, 10), QImage::Format_ARGB32_Premultiplied);
|
||||
red.fill(Qt::red);
|
||||
|
@ -1101,7 +1101,7 @@ void PointerInputTest::testEffectOverrideCursorImage()
|
|||
// now let's create a window
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -1177,7 +1177,7 @@ void PointerInputTest::testPopup()
|
|||
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -1202,7 +1202,7 @@ void PointerInputTest::testPopup()
|
|||
positioner->set_anchor_rect(0, 0, 80, 20);
|
||||
positioner->set_anchor(Test::XdgPositioner::anchor_bottom_right);
|
||||
positioner->set_gravity(Test::XdgPositioner::gravity_bottom_right);
|
||||
Surface *popupSurface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *popupSurface = Test::createSurface(m_compositor);
|
||||
QVERIFY(popupSurface);
|
||||
Test::XdgPopup *popupShellSurface = Test::createXdgPopupSurface(popupSurface, shellSurface->xdgSurface(), positioner.data());
|
||||
QVERIFY(popupShellSurface);
|
||||
|
@ -1260,7 +1260,7 @@ void PointerInputTest::testDecoCancelsPopup()
|
|||
Cursors::self()->mouse()->setPos(800, 800);
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -1295,7 +1295,7 @@ void PointerInputTest::testDecoCancelsPopup()
|
|||
positioner->set_anchor_rect(0, 0, 80, 20);
|
||||
positioner->set_anchor(Test::XdgPositioner::anchor_bottom_right);
|
||||
positioner->set_gravity(Test::XdgPositioner::gravity_bottom_right);
|
||||
Surface *popupSurface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *popupSurface = Test::createSurface(m_compositor);
|
||||
QVERIFY(popupSurface);
|
||||
Test::XdgPopup *popupShellSurface = Test::createXdgPopupSurface(popupSurface, shellSurface->xdgSurface(), positioner.data());
|
||||
QVERIFY(popupShellSurface);
|
||||
|
@ -1339,7 +1339,7 @@ void PointerInputTest::testWindowUnderCursorWhileButtonPressed()
|
|||
Cursors::self()->mouse()->setPos(800, 800);
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
QVERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -1362,7 +1362,7 @@ void PointerInputTest::testWindowUnderCursorWhileButtonPressed()
|
|||
positioner->set_anchor_rect(0, 0, 1, 1);
|
||||
positioner->set_anchor(Test::XdgPositioner::anchor_bottom_right);
|
||||
positioner->set_gravity(Test::XdgPositioner::gravity_bottom_right);
|
||||
Surface *popupSurface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *popupSurface = Test::createSurface(m_compositor);
|
||||
QVERIFY(popupSurface);
|
||||
Test::XdgPopup *popupShellSurface = Test::createXdgPopupSurface(popupSurface, shellSurface->xdgSurface(), positioner.data());
|
||||
QVERIFY(popupShellSurface);
|
||||
|
@ -1516,7 +1516,7 @@ void PointerInputTest::testResizeCursor()
|
|||
|
||||
// create a test client
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -1547,9 +1547,9 @@ void PointerInputTest::testResizeCursor()
|
|||
|
||||
// wait for the enter event and set the cursor
|
||||
QVERIFY(enteredSpy.wait());
|
||||
QScopedPointer<Surface> cursorSurface(Test::createSurface(m_compositor));
|
||||
QScopedPointer<KWayland::Client::Surface> cursorSurface(Test::createSurface(m_compositor));
|
||||
QVERIFY(cursorSurface);
|
||||
QSignalSpy cursorRenderedSpy(cursorSurface.data(), &Surface::frameRendered);
|
||||
QSignalSpy cursorRenderedSpy(cursorSurface.data(), &KWayland::Client::Surface::frameRendered);
|
||||
QVERIFY(cursorRenderedSpy.isValid());
|
||||
cursorSurface->attachBuffer(Test::waylandShmPool()->createBuffer(arrowCursor.image()));
|
||||
cursorSurface->damage(arrowCursor.image().rect());
|
||||
|
@ -1606,7 +1606,7 @@ void PointerInputTest::testMoveCursor()
|
|||
|
||||
// create a test client
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -1618,9 +1618,9 @@ void PointerInputTest::testMoveCursor()
|
|||
|
||||
// wait for the enter event and set the cursor
|
||||
QVERIFY(enteredSpy.wait());
|
||||
QScopedPointer<Surface> cursorSurface(Test::createSurface(m_compositor));
|
||||
QScopedPointer<KWayland::Client::Surface> cursorSurface(Test::createSurface(m_compositor));
|
||||
QVERIFY(cursorSurface);
|
||||
QSignalSpy cursorRenderedSpy(cursorSurface.data(), &Surface::frameRendered);
|
||||
QSignalSpy cursorRenderedSpy(cursorSurface.data(), &KWayland::Client::Surface::frameRendered);
|
||||
QVERIFY(cursorRenderedSpy.isValid());
|
||||
cursorSurface->attachBuffer(Test::waylandShmPool()->createBuffer(arrowCursor.image()));
|
||||
cursorSurface->damage(arrowCursor.image().rect());
|
||||
|
@ -1679,7 +1679,7 @@ void PointerInputTest::testDefaultInputRegion()
|
|||
|
||||
// Create a test client.
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -1701,7 +1701,7 @@ void PointerInputTest::testEmptyInputRegion()
|
|||
|
||||
// Create a test client.
|
||||
using namespace KWayland::Client;
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
std::unique_ptr<KWayland::Client::Region> inputRegion(m_compositor->createRegion(QRegion()));
|
||||
surface->setInputRegion(inputRegion.get());
|
||||
|
|
|
@ -150,7 +150,7 @@ void QuickTilingTest::testQuickTiling()
|
|||
{
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -226,7 +226,7 @@ void QuickTilingTest::testQuickMaximizing()
|
|||
{
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -335,7 +335,7 @@ void QuickTilingTest::testQuickTilingKeyboardMove()
|
|||
{
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
@ -402,7 +402,7 @@ void QuickTilingTest::testQuickTilingPointerMove()
|
|||
{
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(
|
||||
|
@ -414,7 +414,7 @@ void QuickTilingTest::testQuickTilingPointerMove()
|
|||
QVERIFY(toplevelConfigureRequestedSpy.isValid());
|
||||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
QVERIFY(surfaceConfigureRequestedSpy.isValid());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(surfaceConfigureRequestedSpy.wait());
|
||||
QCOMPARE(surfaceConfigureRequestedSpy.count(), 1);
|
||||
|
||||
|
@ -475,7 +475,7 @@ void QuickTilingTest::testQuickTilingTouchMove()
|
|||
// see BUG: 390113
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<ServerSideDecoration> deco(Test::waylandServerSideDecoration()->create(surface.data()));
|
||||
|
||||
|
@ -488,7 +488,7 @@ void QuickTilingTest::testQuickTilingTouchMove()
|
|||
QVERIFY(toplevelConfigureRequestedSpy.isValid());
|
||||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
QVERIFY(surfaceConfigureRequestedSpy.isValid());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(surfaceConfigureRequestedSpy.wait());
|
||||
QCOMPARE(surfaceConfigureRequestedSpy.count(), 1);
|
||||
|
||||
|
@ -732,7 +732,7 @@ void QuickTilingTest::testShortcut()
|
|||
{
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
@ -819,7 +819,7 @@ void QuickTilingTest::testScript()
|
|||
{
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
|
|
|
@ -146,7 +146,7 @@ void SceneQPainterTest::testWindow()
|
|||
using namespace KWayland::Client;
|
||||
QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Seat));
|
||||
QVERIFY(Test::waitForWaylandPointer());
|
||||
QScopedPointer<Surface> s(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> s(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> ss(Test::createXdgToplevelSurface(s.data()));
|
||||
QScopedPointer<Pointer> p(Test::waylandSeat()->createPointer());
|
||||
|
||||
|
@ -168,7 +168,7 @@ void SceneQPainterTest::testWindow()
|
|||
painter.fillRect(0, 0, 200, 300, Qt::blue);
|
||||
|
||||
// now let's set a cursor image
|
||||
QScopedPointer<Surface> cs(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> cs(Test::createSurface());
|
||||
QVERIFY(!cs.isNull());
|
||||
Test::render(cs.data(), QSize(10, 10), Qt::red);
|
||||
p->setCursor(cs.data(), QPoint(5, 5));
|
||||
|
@ -190,7 +190,7 @@ void SceneQPainterTest::testWindowScaled()
|
|||
using namespace KWayland::Client;
|
||||
QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Seat));
|
||||
QVERIFY(Test::waitForWaylandPointer());
|
||||
QScopedPointer<Surface> s(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> s(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> ss(Test::createXdgToplevelSurface(s.data()));
|
||||
QScopedPointer<Pointer> p(Test::waylandSeat()->createPointer());
|
||||
QSignalSpy pointerEnteredSpy(p.data(), &Pointer::entered);
|
||||
|
@ -202,7 +202,7 @@ void SceneQPainterTest::testWindowScaled()
|
|||
QVERIFY(frameRenderedSpy.isValid());
|
||||
|
||||
// now let's set a cursor image
|
||||
QScopedPointer<Surface> cs(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> cs(Test::createSurface());
|
||||
QVERIFY(!cs.isNull());
|
||||
Test::render(cs.data(), QSize(10, 10), Qt::red);
|
||||
|
||||
|
@ -241,7 +241,7 @@ void SceneQPainterTest::testCompositorRestart()
|
|||
// first create a window
|
||||
using namespace KWayland::Client;
|
||||
QVERIFY(Test::setupWaylandConnection());
|
||||
QScopedPointer<Surface> s(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> s(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> ss(Test::createXdgToplevelSurface(s.data()));
|
||||
QVERIFY(Test::renderAndWaitForShown(s.data(), QSize(200, 300), Qt::blue));
|
||||
|
||||
|
|
|
@ -110,14 +110,14 @@ void MinimizeAllScriptTest::testMinimizeUnminimize()
|
|||
using namespace KWayland::Client;
|
||||
|
||||
// Create a couple of test clients.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client1);
|
||||
QVERIFY(client1->isActive());
|
||||
QVERIFY(client1->isMinimizable());
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(client2);
|
||||
|
|
|
@ -57,10 +57,10 @@ void ShowingDesktopTest::cleanup()
|
|||
|
||||
void ShowingDesktopTest::testRestoreFocus()
|
||||
{
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
auto client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
auto client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client1 != client2);
|
||||
|
@ -79,7 +79,7 @@ void ShowingDesktopTest::testRestoreFocusWithDesktopWindow()
|
|||
{
|
||||
// first create a desktop window
|
||||
|
||||
QScopedPointer<Surface> desktopSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> desktopSurface(Test::createSurface());
|
||||
QVERIFY(!desktopSurface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> desktopShellSurface(Test::createXdgToplevelSurface(desktopSurface.data()));
|
||||
QVERIFY(!desktopSurface.isNull());
|
||||
|
@ -92,10 +92,10 @@ void ShowingDesktopTest::testRestoreFocusWithDesktopWindow()
|
|||
QVERIFY(desktop->isDesktop());
|
||||
|
||||
// now create some windows
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
auto client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
auto client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client1 != client2);
|
||||
|
|
|
@ -162,10 +162,10 @@ void StrutsTest::testWaylandStruts()
|
|||
|
||||
QFETCH(QVector<QRect>, windowGeometries);
|
||||
// create the panels
|
||||
QHash<Surface*, AbstractClient *> clients;
|
||||
QHash<KWayland::Client::Surface*, AbstractClient *> clients;
|
||||
for (auto it = windowGeometries.constBegin(), end = windowGeometries.constEnd(); it != end; it++) {
|
||||
const QRect windowGeometry = *it;
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
KWayland::Client::Surface *surface = Test::createSurface(m_compositor);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface, Test::CreationSetup::CreateOnly);
|
||||
PlasmaShellSurface *plasmaSurface = m_plasmaShell->createSurface(surface, surface);
|
||||
plasmaSurface->setPosition(windowGeometry.topLeft());
|
||||
|
@ -173,7 +173,7 @@ void StrutsTest::testWaylandStruts()
|
|||
|
||||
QSignalSpy configureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
QVERIFY(configureRequestedSpy.isValid());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(configureRequestedSpy.wait());
|
||||
|
||||
// map the window
|
||||
|
@ -228,7 +228,7 @@ void StrutsTest::testMoveWaylandPanel()
|
|||
// this test verifies that repositioning a Wayland panel updates the client area
|
||||
using namespace KWayland::Client;
|
||||
const QRect windowGeometry(0, 1000, 1280, 24);
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
QScopedPointer<PlasmaShellSurface> plasmaSurface(m_plasmaShell->createSurface(surface.data()));
|
||||
plasmaSurface->setPosition(windowGeometry.topLeft());
|
||||
|
@ -236,7 +236,7 @@ void StrutsTest::testMoveWaylandPanel()
|
|||
|
||||
QSignalSpy configureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
QVERIFY(configureRequestedSpy.isValid());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(configureRequestedSpy.wait());
|
||||
|
||||
// map the window
|
||||
|
@ -280,7 +280,7 @@ void StrutsTest::testWaylandMobilePanel()
|
|||
|
||||
// create first top panel
|
||||
const QRect windowGeometry(0, 0, 1280, 60);
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
QScopedPointer<PlasmaShellSurface> plasmaSurface(m_plasmaShell->createSurface(surface.data()));
|
||||
plasmaSurface->setPosition(windowGeometry.topLeft());
|
||||
|
@ -288,7 +288,7 @@ void StrutsTest::testWaylandMobilePanel()
|
|||
|
||||
QSignalSpy configureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
QVERIFY(configureRequestedSpy.isValid());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(configureRequestedSpy.wait());
|
||||
|
||||
// map the window
|
||||
|
@ -308,7 +308,7 @@ void StrutsTest::testWaylandMobilePanel()
|
|||
|
||||
// create another bottom panel
|
||||
const QRect windowGeometry2(0, 874, 1280, 150);
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data(), surface2.data(), Test::CreationSetup::CreateOnly));
|
||||
QScopedPointer<PlasmaShellSurface> plasmaSurface2(m_plasmaShell->createSurface(surface2.data()));
|
||||
plasmaSurface2->setPosition(windowGeometry2.topLeft());
|
||||
|
@ -316,7 +316,7 @@ void StrutsTest::testWaylandMobilePanel()
|
|||
|
||||
QSignalSpy configureRequestedSpy2(shellSurface2->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
QVERIFY(configureRequestedSpy2.isValid());
|
||||
surface2->commit(Surface::CommitFlag::None);
|
||||
surface2->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(configureRequestedSpy2.wait());
|
||||
|
||||
// map the window
|
||||
|
|
|
@ -76,17 +76,17 @@ void TabBoxTest::testCapsLock()
|
|||
// bug 368590
|
||||
|
||||
// first create three windows
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
auto c1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c1);
|
||||
QVERIFY(c1->isActive());
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
auto c2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(c2);
|
||||
QVERIFY(c2->isActive());
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface3(Test::createXdgToplevelSurface(surface3.data()));
|
||||
auto c3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(c3);
|
||||
|
@ -139,17 +139,17 @@ void TabBoxTest::testMoveForward()
|
|||
// this test verifies that Alt+tab works correctly moving forward
|
||||
|
||||
// first create three windows
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
auto c1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c1);
|
||||
QVERIFY(c1->isActive());
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
auto c2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(c2);
|
||||
QVERIFY(c2->isActive());
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface3(Test::createXdgToplevelSurface(surface3.data()));
|
||||
auto c3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(c3);
|
||||
|
@ -190,17 +190,17 @@ void TabBoxTest::testMoveBackward()
|
|||
// this test verifies that Alt+Shift+tab works correctly moving backward
|
||||
|
||||
// first create three windows
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface1(Test::createXdgToplevelSurface(surface1.data()));
|
||||
auto c1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c1);
|
||||
QVERIFY(c1->isActive());
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
auto c2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(c2);
|
||||
QVERIFY(c2->isActive());
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface3(Test::createXdgToplevelSurface(surface3.data()));
|
||||
auto c3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(c3);
|
||||
|
|
|
@ -77,7 +77,7 @@ XdgShell::~XdgShell()
|
|||
destroy();
|
||||
}
|
||||
|
||||
XdgSurface::XdgSurface(XdgShell *shell, Surface *surface, QObject *parent)
|
||||
XdgSurface::XdgSurface(XdgShell *shell, KWayland::Client::Surface *surface, QObject *parent)
|
||||
: QObject(parent)
|
||||
, QtWayland::xdg_surface(shell->get_xdg_surface(*surface))
|
||||
, m_surface(surface)
|
||||
|
@ -89,7 +89,7 @@ XdgSurface::~XdgSurface()
|
|||
destroy();
|
||||
}
|
||||
|
||||
Surface *XdgSurface::surface() const
|
||||
KWayland::Client::Surface *XdgSurface::surface() const
|
||||
{
|
||||
return m_surface;
|
||||
}
|
||||
|
@ -258,14 +258,14 @@ public:
|
|||
~MockInputMethod();
|
||||
|
||||
AbstractClient *client() const { return m_client; }
|
||||
Surface *inputPanelSurface() const { return m_inputSurface; }
|
||||
KWayland::Client::Surface *inputPanelSurface() const { return m_inputSurface; }
|
||||
|
||||
protected:
|
||||
void zwp_input_method_v1_activate(struct ::zwp_input_method_context_v1 *context) override;
|
||||
void zwp_input_method_v1_deactivate(struct ::zwp_input_method_context_v1 *context) override;
|
||||
|
||||
private:
|
||||
QPointer<Surface> m_inputSurface;
|
||||
QPointer<KWayland::Client::Surface> m_inputSurface;
|
||||
QtWayland::zwp_input_panel_surface_v1 *m_inputMethodSurface = nullptr;
|
||||
QPointer<AbstractClient> m_client;
|
||||
};
|
||||
|
@ -275,7 +275,7 @@ AbstractClient *inputPanelClient()
|
|||
return s_waylandConnection.inputMethodV1->client();
|
||||
}
|
||||
|
||||
Surface *inputPanelSurface()
|
||||
KWayland::Client::Surface *inputPanelSurface()
|
||||
{
|
||||
return s_waylandConnection.inputMethodV1->inputPanelSurface();
|
||||
}
|
||||
|
@ -692,18 +692,18 @@ bool waitForWaylandKeyboard()
|
|||
return hasKeyboardSpy.wait();
|
||||
}
|
||||
|
||||
void render(Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format)
|
||||
void render(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format)
|
||||
{
|
||||
QImage img(size, format);
|
||||
img.fill(color);
|
||||
render(surface, img);
|
||||
}
|
||||
|
||||
void render(Surface *surface, const QImage &img)
|
||||
void render(KWayland::Client::Surface *surface, const QImage &img)
|
||||
{
|
||||
surface->attachBuffer(s_waylandConnection.shm->createBuffer(img));
|
||||
surface->damage(QRect(QPoint(0, 0), img.size()));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
}
|
||||
|
||||
AbstractClient *waitForWaylandWindowShown(int timeout)
|
||||
|
@ -718,7 +718,7 @@ AbstractClient *waitForWaylandWindowShown(int timeout)
|
|||
return clientAddedSpy.first().first().value<AbstractClient *>();
|
||||
}
|
||||
|
||||
AbstractClient *renderAndWaitForShown(Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format, int timeout)
|
||||
AbstractClient *renderAndWaitForShown(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format, int timeout)
|
||||
{
|
||||
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
|
||||
if (!clientAddedSpy.isValid()) {
|
||||
|
@ -739,7 +739,7 @@ void flushWaylandConnection()
|
|||
}
|
||||
}
|
||||
|
||||
Surface *createSurface(QObject *parent)
|
||||
KWayland::Client::Surface *createSurface(QObject *parent)
|
||||
{
|
||||
if (!s_waylandConnection.compositor) {
|
||||
return nullptr;
|
||||
|
@ -752,7 +752,7 @@ Surface *createSurface(QObject *parent)
|
|||
return s;
|
||||
}
|
||||
|
||||
SubSurface *createSubSurface(Surface *surface, Surface *parentSurface, QObject *parent)
|
||||
SubSurface *createSubSurface(KWayland::Client::Surface *surface, KWayland::Client::Surface *parentSurface, QObject *parent)
|
||||
{
|
||||
if (!s_waylandConnection.subCompositor) {
|
||||
return nullptr;
|
||||
|
@ -765,7 +765,7 @@ SubSurface *createSubSurface(Surface *surface, Surface *parentSurface, QObject *
|
|||
return s;
|
||||
}
|
||||
|
||||
LayerSurfaceV1 *createLayerSurfaceV1(Surface *surface, const QString &scope, Output *output, LayerShellV1::layer layer)
|
||||
LayerSurfaceV1 *createLayerSurfaceV1(KWayland::Client::Surface *surface, const QString &scope, Output *output, LayerShellV1::layer layer)
|
||||
{
|
||||
LayerShellV1 *shell = s_waylandConnection.layerShellV1;
|
||||
if (!shell) {
|
||||
|
@ -784,7 +784,7 @@ LayerSurfaceV1 *createLayerSurfaceV1(Surface *surface, const QString &scope, Out
|
|||
return shellSurface;
|
||||
}
|
||||
|
||||
QtWayland::zwp_input_panel_surface_v1 *createInputPanelSurfaceV1(Surface *surface, Output *output)
|
||||
QtWayland::zwp_input_panel_surface_v1 *createInputPanelSurfaceV1(KWayland::Client::Surface *surface, Output *output)
|
||||
{
|
||||
if (!s_waylandConnection.inputPanelV1) {
|
||||
qWarning() << "Unable to create the input panel surface. The interface input_panel global is not bound";
|
||||
|
@ -807,13 +807,13 @@ static void waitForConfigured(XdgSurface *shellSurface)
|
|||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface, &XdgSurface::configureRequested);
|
||||
QVERIFY(surfaceConfigureRequestedSpy.isValid());
|
||||
|
||||
shellSurface->surface()->commit(Surface::CommitFlag::None);
|
||||
shellSurface->surface()->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(surfaceConfigureRequestedSpy.wait());
|
||||
|
||||
shellSurface->ack_configure(surfaceConfigureRequestedSpy.last().first().toUInt());
|
||||
}
|
||||
|
||||
XdgToplevel *createXdgToplevelSurface(Surface *surface, QObject *parent, CreationSetup configureMode)
|
||||
XdgToplevel *createXdgToplevelSurface(KWayland::Client::Surface *surface, QObject *parent, CreationSetup configureMode)
|
||||
{
|
||||
XdgShell *shell = s_waylandConnection.xdgShell;
|
||||
|
||||
|
@ -844,7 +844,7 @@ XdgPositioner *createXdgPositioner()
|
|||
return new XdgPositioner(shell);
|
||||
}
|
||||
|
||||
XdgPopup *createXdgPopupSurface(Surface *surface, XdgSurface *parentSurface, XdgPositioner *positioner,
|
||||
XdgPopup *createXdgPopupSurface(KWayland::Client::Surface *surface, XdgSurface *parentSurface, XdgPositioner *positioner,
|
||||
QObject *parent, CreationSetup configureMode)
|
||||
{
|
||||
XdgShell *shell = s_waylandConnection.xdgShell;
|
||||
|
|
|
@ -94,7 +94,7 @@ AbstractClient *TouchInputTest::showWindow(bool decorated)
|
|||
if (!QTest::qCompare(actual, expected, #actual, #expected, __FILE__, __LINE__))\
|
||||
return nullptr;
|
||||
|
||||
Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
VERIFY(surface);
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface);
|
||||
VERIFY(shellSurface);
|
||||
|
|
|
@ -420,7 +420,7 @@ void TransientPlacementTest::testXdgPopup()
|
|||
QFETCH(QRect, expectedGeometry);
|
||||
const QRect expectedRelativeGeometry = expectedGeometry.translated(-parentPosition);
|
||||
|
||||
Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *surface = Test::createSurface(Test::waylandCompositor());
|
||||
QVERIFY(surface);
|
||||
auto parentShellSurface = Test::createXdgToplevelSurface(surface, Test::waylandCompositor());
|
||||
QVERIFY(parentShellSurface);
|
||||
|
@ -434,7 +434,7 @@ void TransientPlacementTest::testXdgPopup()
|
|||
//create popup
|
||||
QFETCH(PopupLayout, layout);
|
||||
|
||||
Surface *transientSurface = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *transientSurface = Test::createSurface(Test::waylandCompositor());
|
||||
QVERIFY(transientSurface);
|
||||
|
||||
QScopedPointer<Test::XdgPositioner> positioner(Test::createXdgPositioner());
|
||||
|
@ -446,7 +446,7 @@ void TransientPlacementTest::testXdgPopup()
|
|||
auto popup = Test::createXdgPopupSurface(transientSurface, parentShellSurface->xdgSurface(), positioner.data(), Test::waylandCompositor(), Test::CreationSetup::CreateOnly);
|
||||
QSignalSpy popupConfigureRequestedSpy(popup, &Test::XdgPopup::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy(popup->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
transientSurface->commit(Surface::CommitFlag::None);
|
||||
transientSurface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
QVERIFY(surfaceConfigureRequestedSpy.wait());
|
||||
QCOMPARE(surfaceConfigureRequestedSpy.count(), 1);
|
||||
|
@ -467,7 +467,7 @@ void TransientPlacementTest::testXdgPopupWithPanel()
|
|||
{
|
||||
using namespace KWayland::Client;
|
||||
|
||||
QScopedPointer<Surface> surface{Test::createSurface()};
|
||||
QScopedPointer<KWayland::Client::Surface> surface{Test::createSurface()};
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<Test::XdgToplevel> dockShellSurface{Test::createXdgToplevelSurface(surface.data())};
|
||||
QVERIFY(!dockShellSurface.isNull());
|
||||
|
@ -488,7 +488,7 @@ void TransientPlacementTest::testXdgPopupWithPanel()
|
|||
QVERIFY(workspace()->clientArea(PlacementArea, 0, 1) != workspace()->clientArea(FullScreenArea, 0, 1));
|
||||
|
||||
//create parent
|
||||
Surface *parentSurface = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *parentSurface = Test::createSurface(Test::waylandCompositor());
|
||||
QVERIFY(parentSurface);
|
||||
auto parentShellSurface = Test::createXdgToplevelSurface(parentSurface, Test::waylandCompositor());
|
||||
QVERIFY(parentShellSurface);
|
||||
|
@ -500,7 +500,7 @@ void TransientPlacementTest::testXdgPopupWithPanel()
|
|||
parent->keepInArea(workspace()->clientArea(PlacementArea, parent));
|
||||
QCOMPARE(parent->frameGeometry(), QRect(0, screens()->geometry(0).height() - 600 - 50, 800, 600));
|
||||
|
||||
Surface *transientSurface = Test::createSurface(Test::waylandCompositor());
|
||||
KWayland::Client::Surface *transientSurface = Test::createSurface(Test::waylandCompositor());
|
||||
QVERIFY(transientSurface);
|
||||
|
||||
QScopedPointer<Test::XdgPositioner> positioner(Test::createXdgPositioner());
|
||||
|
|
|
@ -128,7 +128,7 @@ void VirtualDesktopTest::testLastDesktopRemoved()
|
|||
QCOMPARE(VirtualDesktopManager::self()->current(), 2u);
|
||||
|
||||
// now create a window on this desktop
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
|
||||
|
@ -163,7 +163,7 @@ void VirtualDesktopTest::testWindowOnMultipleDesktops()
|
|||
QCOMPARE(VirtualDesktopManager::self()->current(), 3u);
|
||||
|
||||
// now create a window on this desktop
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
|
||||
|
@ -242,7 +242,7 @@ void VirtualDesktopTest::testRemoveDesktopWithWindow()
|
|||
QCOMPARE(VirtualDesktopManager::self()->current(), 3u);
|
||||
|
||||
// now create a window on this desktop
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ void TestWindowSelection::cleanup()
|
|||
void TestWindowSelection::testSelectOnWindowPointer()
|
||||
{
|
||||
// this test verifies window selection through pointer works
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QScopedPointer<Pointer> pointer(Test::waylandSeat()->createPointer());
|
||||
QScopedPointer<Keyboard> keyboard(Test::waylandSeat()->createKeyboard());
|
||||
|
@ -173,7 +173,7 @@ void TestWindowSelection::testSelectOnWindowKeyboard_data()
|
|||
void TestWindowSelection::testSelectOnWindowKeyboard()
|
||||
{
|
||||
// this test verifies window selection through keyboard key
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QScopedPointer<Pointer> pointer(Test::waylandSeat()->createPointer());
|
||||
QScopedPointer<Keyboard> keyboard(Test::waylandSeat()->createKeyboard());
|
||||
|
@ -250,7 +250,7 @@ void TestWindowSelection::testSelectOnWindowTouch()
|
|||
QVERIFY(touchStartedSpy.isValid());
|
||||
QSignalSpy touchCanceledSpy(touch.data(), &Touch::sequenceCanceled);
|
||||
QVERIFY(touchCanceledSpy.isValid());
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
@ -308,7 +308,7 @@ void TestWindowSelection::testSelectOnWindowTouch()
|
|||
void TestWindowSelection::testCancelOnWindowPointer()
|
||||
{
|
||||
// this test verifies that window selection cancels through right button click
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QScopedPointer<Pointer> pointer(Test::waylandSeat()->createPointer());
|
||||
QScopedPointer<Keyboard> keyboard(Test::waylandSeat()->createKeyboard());
|
||||
|
@ -367,7 +367,7 @@ void TestWindowSelection::testCancelOnWindowPointer()
|
|||
void TestWindowSelection::testCancelOnWindowKeyboard()
|
||||
{
|
||||
// this test verifies that cancel window selection through escape key works
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QScopedPointer<Pointer> pointer(Test::waylandSeat()->createPointer());
|
||||
QScopedPointer<Keyboard> keyboard(Test::waylandSeat()->createKeyboard());
|
||||
|
@ -426,7 +426,7 @@ void TestWindowSelection::testCancelOnWindowKeyboard()
|
|||
void TestWindowSelection::testSelectPointPointer()
|
||||
{
|
||||
// this test verifies point selection through pointer works
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QScopedPointer<Pointer> pointer(Test::waylandSeat()->createPointer());
|
||||
QScopedPointer<Keyboard> keyboard(Test::waylandSeat()->createKeyboard());
|
||||
|
|
|
@ -562,7 +562,7 @@ void X11ClientTest::testFullscreenLayerWithActiveWaylandWindow()
|
|||
QCOMPARE(workspace()->stackingOrder().last(), client);
|
||||
|
||||
// now let's open a Wayland window
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto waylandClient = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(waylandClient);
|
||||
|
@ -673,7 +673,7 @@ void X11ClientTest::testFocusInWithWaylandLastActiveWindow()
|
|||
QVERIFY(client->isActive());
|
||||
|
||||
// create Wayland window
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto waylandClient = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(waylandClient);
|
||||
|
@ -741,7 +741,7 @@ void X11ClientTest::testX11WindowId()
|
|||
QCOMPARE(rootInfo.activeWindow(), client->window());
|
||||
|
||||
// activate a wayland window
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto waylandClient = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(waylandClient);
|
||||
|
|
|
@ -173,10 +173,10 @@ void TestXdgShellClientRules::cleanup()
|
|||
QCOMPARE(VirtualDesktopManager::self()->count(), 1u);
|
||||
}
|
||||
|
||||
std::tuple<AbstractClient *, Surface *, Test::XdgToplevel *> createWindow(const QString &appId)
|
||||
std::tuple<AbstractClient *, KWayland::Client::Surface *, Test::XdgToplevel *> createWindow(const QString &appId)
|
||||
{
|
||||
// Create an xdg surface.
|
||||
Surface *surface = Test::createSurface();
|
||||
KWayland::Client::Surface *surface = Test::createSurface();
|
||||
Test::XdgToplevel *shellSurface = Test::createXdgToplevelSurface(surface, surface, Test::CreationSetup::CreateOnly);
|
||||
|
||||
// Assign the desired app id.
|
||||
|
@ -184,7 +184,7 @@ std::tuple<AbstractClient *, Surface *, Test::XdgToplevel *> createWindow(const
|
|||
|
||||
// Wait for the initial configure event.
|
||||
QSignalSpy configureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
configureRequestedSpy.wait();
|
||||
|
||||
// Draw content of the surface.
|
||||
|
@ -211,7 +211,7 @@ void TestXdgShellClientRules::testPositionDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -246,7 +246,7 @@ void TestXdgShellClientRules::testPositionApply()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -322,7 +322,7 @@ void TestXdgShellClientRules::testPositionRemember()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -398,7 +398,7 @@ void TestXdgShellClientRules::testPositionForce()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -442,7 +442,7 @@ void TestXdgShellClientRules::testPositionApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
QObject *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -533,7 +533,7 @@ void TestXdgShellClientRules::testPositionForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -589,7 +589,7 @@ void TestXdgShellClientRules::testSizeDontAffect()
|
|||
workspace()->slotReconfigure();
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
@ -598,7 +598,7 @@ void TestXdgShellClientRules::testSizeDontAffect()
|
|||
QScopedPointer<QSignalSpy> surfaceConfigureRequestedSpy;
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// The window size shouldn't be enforced by the rule.
|
||||
QVERIFY(surfaceConfigureRequestedSpy->wait());
|
||||
|
@ -641,7 +641,7 @@ void TestXdgShellClientRules::testSizeApply()
|
|||
workspace()->slotReconfigure();
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
@ -650,7 +650,7 @@ void TestXdgShellClientRules::testSizeApply()
|
|||
QScopedPointer<QSignalSpy> surfaceConfigureRequestedSpy;
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// The initial configure event should contain size hint set by the rule.
|
||||
Test::XdgToplevel::States states;
|
||||
|
@ -741,7 +741,7 @@ void TestXdgShellClientRules::testSizeApply()
|
|||
toplevelConfigureRequestedSpy.reset(new QSignalSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested));
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
QVERIFY(surfaceConfigureRequestedSpy->wait());
|
||||
QCOMPARE(surfaceConfigureRequestedSpy->count(), 1);
|
||||
|
@ -781,7 +781,7 @@ void TestXdgShellClientRules::testSizeRemember()
|
|||
workspace()->slotReconfigure();
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
@ -790,7 +790,7 @@ void TestXdgShellClientRules::testSizeRemember()
|
|||
QScopedPointer<QSignalSpy> surfaceConfigureRequestedSpy;
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// The initial configure event should contain size hint set by the rule.
|
||||
Test::XdgToplevel::States states;
|
||||
|
@ -881,7 +881,7 @@ void TestXdgShellClientRules::testSizeRemember()
|
|||
toplevelConfigureRequestedSpy.reset(new QSignalSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested));
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
QVERIFY(surfaceConfigureRequestedSpy->wait());
|
||||
QCOMPARE(surfaceConfigureRequestedSpy->count(), 1);
|
||||
|
@ -921,7 +921,7 @@ void TestXdgShellClientRules::testSizeForce()
|
|||
workspace()->slotReconfigure();
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
@ -930,7 +930,7 @@ void TestXdgShellClientRules::testSizeForce()
|
|||
QScopedPointer<QSignalSpy> surfaceConfigureRequestedSpy;
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// The initial configure event should contain size hint set by the rule.
|
||||
QVERIFY(surfaceConfigureRequestedSpy->wait());
|
||||
|
@ -973,7 +973,7 @@ void TestXdgShellClientRules::testSizeForce()
|
|||
toplevelConfigureRequestedSpy.reset(new QSignalSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested));
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
QVERIFY(surfaceConfigureRequestedSpy->wait());
|
||||
QCOMPARE(surfaceConfigureRequestedSpy->count(), 1);
|
||||
|
@ -1000,7 +1000,7 @@ void TestXdgShellClientRules::testSizeForce()
|
|||
void TestXdgShellClientRules::testSizeApplyNow()
|
||||
{
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
@ -1009,7 +1009,7 @@ void TestXdgShellClientRules::testSizeApplyNow()
|
|||
QScopedPointer<QSignalSpy> surfaceConfigureRequestedSpy;
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// The expected surface dimensions should be set by the rule.
|
||||
QVERIFY(surfaceConfigureRequestedSpy->wait());
|
||||
|
@ -1084,7 +1084,7 @@ void TestXdgShellClientRules::testSizeForceTemporarily()
|
|||
workspace()->slotReconfigure();
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
@ -1093,7 +1093,7 @@ void TestXdgShellClientRules::testSizeForceTemporarily()
|
|||
QScopedPointer<QSignalSpy> surfaceConfigureRequestedSpy;
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// The initial configure event should contain size hint set by the rule.
|
||||
QVERIFY(surfaceConfigureRequestedSpy->wait());
|
||||
|
@ -1136,7 +1136,7 @@ void TestXdgShellClientRules::testSizeForceTemporarily()
|
|||
toplevelConfigureRequestedSpy.reset(new QSignalSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested));
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
QVERIFY(surfaceConfigureRequestedSpy->wait());
|
||||
QCOMPARE(surfaceConfigureRequestedSpy->count(), 1);
|
||||
|
@ -1178,7 +1178,7 @@ void TestXdgShellClientRules::testMaximizeDontAffect()
|
|||
workspace()->slotReconfigure();
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
@ -1187,7 +1187,7 @@ void TestXdgShellClientRules::testMaximizeDontAffect()
|
|||
QScopedPointer<QSignalSpy> surfaceConfigureRequestedSpy;
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// Wait for the initial configure event.
|
||||
Test::XdgToplevel::States states;
|
||||
|
@ -1241,7 +1241,7 @@ void TestXdgShellClientRules::testMaximizeApply()
|
|||
workspace()->slotReconfigure();
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
@ -1250,7 +1250,7 @@ void TestXdgShellClientRules::testMaximizeApply()
|
|||
QScopedPointer<QSignalSpy> surfaceConfigureRequestedSpy;
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// Wait for the initial configure event.
|
||||
Test::XdgToplevel::States states;
|
||||
|
@ -1309,7 +1309,7 @@ void TestXdgShellClientRules::testMaximizeApply()
|
|||
toplevelConfigureRequestedSpy.reset(new QSignalSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested));
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
QVERIFY(surfaceConfigureRequestedSpy->wait());
|
||||
QCOMPARE(surfaceConfigureRequestedSpy->count(), 1);
|
||||
|
@ -1359,7 +1359,7 @@ void TestXdgShellClientRules::testMaximizeRemember()
|
|||
workspace()->slotReconfigure();
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
@ -1368,7 +1368,7 @@ void TestXdgShellClientRules::testMaximizeRemember()
|
|||
QScopedPointer<QSignalSpy> surfaceConfigureRequestedSpy;
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// Wait for the initial configure event.
|
||||
Test::XdgToplevel::States states;
|
||||
|
@ -1427,7 +1427,7 @@ void TestXdgShellClientRules::testMaximizeRemember()
|
|||
toplevelConfigureRequestedSpy.reset(new QSignalSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested));
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
QVERIFY(surfaceConfigureRequestedSpy->wait());
|
||||
QCOMPARE(surfaceConfigureRequestedSpy->count(), 1);
|
||||
|
@ -1477,7 +1477,7 @@ void TestXdgShellClientRules::testMaximizeForce()
|
|||
workspace()->slotReconfigure();
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
@ -1486,7 +1486,7 @@ void TestXdgShellClientRules::testMaximizeForce()
|
|||
QScopedPointer<QSignalSpy> surfaceConfigureRequestedSpy;
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// Wait for the initial configure event.
|
||||
Test::XdgToplevel::States states;
|
||||
|
@ -1533,7 +1533,7 @@ void TestXdgShellClientRules::testMaximizeForce()
|
|||
toplevelConfigureRequestedSpy.reset(new QSignalSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested));
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
QVERIFY(surfaceConfigureRequestedSpy->wait());
|
||||
QCOMPARE(surfaceConfigureRequestedSpy->count(), 1);
|
||||
|
@ -1568,7 +1568,7 @@ void TestXdgShellClientRules::testMaximizeForce()
|
|||
void TestXdgShellClientRules::testMaximizeApplyNow()
|
||||
{
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
@ -1577,7 +1577,7 @@ void TestXdgShellClientRules::testMaximizeApplyNow()
|
|||
QScopedPointer<QSignalSpy> surfaceConfigureRequestedSpy;
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// Wait for the initial configure event.
|
||||
Test::XdgToplevel::States states;
|
||||
|
@ -1693,7 +1693,7 @@ void TestXdgShellClientRules::testMaximizeForceTemporarily()
|
|||
workspace()->slotReconfigure();
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
@ -1702,7 +1702,7 @@ void TestXdgShellClientRules::testMaximizeForceTemporarily()
|
|||
QScopedPointer<QSignalSpy> surfaceConfigureRequestedSpy;
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// Wait for the initial configure event.
|
||||
Test::XdgToplevel::States states;
|
||||
|
@ -1749,7 +1749,7 @@ void TestXdgShellClientRules::testMaximizeForceTemporarily()
|
|||
toplevelConfigureRequestedSpy.reset(new QSignalSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested));
|
||||
surfaceConfigureRequestedSpy.reset(new QSignalSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
QVERIFY(surfaceConfigureRequestedSpy->wait());
|
||||
QCOMPARE(surfaceConfigureRequestedSpy->count(), 1);
|
||||
|
@ -1804,7 +1804,7 @@ void TestXdgShellClientRules::testDesktopDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -1842,7 +1842,7 @@ void TestXdgShellClientRules::testDesktopApply()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -1896,7 +1896,7 @@ void TestXdgShellClientRules::testDesktopRemember()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -1947,7 +1947,7 @@ void TestXdgShellClientRules::testDesktopForce()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -1988,7 +1988,7 @@ void TestXdgShellClientRules::testDesktopApplyNow()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2051,7 +2051,7 @@ void TestXdgShellClientRules::testDesktopForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2107,7 +2107,7 @@ void TestXdgShellClientRules::testMinimizeDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2139,7 +2139,7 @@ void TestXdgShellClientRules::testMinimizeApply()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2184,7 +2184,7 @@ void TestXdgShellClientRules::testMinimizeRemember()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2227,7 +2227,7 @@ void TestXdgShellClientRules::testMinimizeForce()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2259,7 +2259,7 @@ void TestXdgShellClientRules::testMinimizeApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2315,7 +2315,7 @@ void TestXdgShellClientRules::testMinimizeForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2360,7 +2360,7 @@ void TestXdgShellClientRules::testSkipTaskbarDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2391,7 +2391,7 @@ void TestXdgShellClientRules::testSkipTaskbarApply()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2434,7 +2434,7 @@ void TestXdgShellClientRules::testSkipTaskbarRemember()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2479,7 +2479,7 @@ void TestXdgShellClientRules::testSkipTaskbarForce()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2511,7 +2511,7 @@ void TestXdgShellClientRules::testSkipTaskbarApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2564,7 +2564,7 @@ void TestXdgShellClientRules::testSkipTaskbarForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2611,7 +2611,7 @@ void TestXdgShellClientRules::testSkipPagerDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2642,7 +2642,7 @@ void TestXdgShellClientRules::testSkipPagerApply()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2685,7 +2685,7 @@ void TestXdgShellClientRules::testSkipPagerRemember()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2730,7 +2730,7 @@ void TestXdgShellClientRules::testSkipPagerForce()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2762,7 +2762,7 @@ void TestXdgShellClientRules::testSkipPagerApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2815,7 +2815,7 @@ void TestXdgShellClientRules::testSkipPagerForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2862,7 +2862,7 @@ void TestXdgShellClientRules::testSkipSwitcherDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2893,7 +2893,7 @@ void TestXdgShellClientRules::testSkipSwitcherApply()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2936,7 +2936,7 @@ void TestXdgShellClientRules::testSkipSwitcherRemember()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -2981,7 +2981,7 @@ void TestXdgShellClientRules::testSkipSwitcherForce()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3013,7 +3013,7 @@ void TestXdgShellClientRules::testSkipSwitcherApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3066,7 +3066,7 @@ void TestXdgShellClientRules::testSkipSwitcherForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3113,7 +3113,7 @@ void TestXdgShellClientRules::testKeepAboveDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3144,7 +3144,7 @@ void TestXdgShellClientRules::testKeepAboveApply()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3187,7 +3187,7 @@ void TestXdgShellClientRules::testKeepAboveRemember()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3230,7 +3230,7 @@ void TestXdgShellClientRules::testKeepAboveForce()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3260,7 +3260,7 @@ void TestXdgShellClientRules::testKeepAboveApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3313,7 +3313,7 @@ void TestXdgShellClientRules::testKeepAboveForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3362,7 +3362,7 @@ void TestXdgShellClientRules::testKeepBelowDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3393,7 +3393,7 @@ void TestXdgShellClientRules::testKeepBelowApply()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3436,7 +3436,7 @@ void TestXdgShellClientRules::testKeepBelowRemember()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3479,7 +3479,7 @@ void TestXdgShellClientRules::testKeepBelowForce()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3509,7 +3509,7 @@ void TestXdgShellClientRules::testKeepBelowApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3562,7 +3562,7 @@ void TestXdgShellClientRules::testKeepBelowForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3611,7 +3611,7 @@ void TestXdgShellClientRules::testShortcutDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3655,7 +3655,7 @@ void TestXdgShellClientRules::testShortcutApply()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3737,7 +3737,7 @@ void TestXdgShellClientRules::testShortcutRemember()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3807,7 +3807,7 @@ void TestXdgShellClientRules::testShortcutForce()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3862,7 +3862,7 @@ void TestXdgShellClientRules::testShortcutApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -3940,7 +3940,7 @@ void TestXdgShellClientRules::testShortcutForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -4054,7 +4054,7 @@ void TestXdgShellClientRules::testActiveOpacityDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -4086,7 +4086,7 @@ void TestXdgShellClientRules::testActiveOpacityForce()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -4116,7 +4116,7 @@ void TestXdgShellClientRules::testActiveOpacityForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -4155,7 +4155,7 @@ void TestXdgShellClientRules::testInactiveOpacityDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -4191,7 +4191,7 @@ void TestXdgShellClientRules::testInactiveOpacityForce()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -4228,7 +4228,7 @@ void TestXdgShellClientRules::testInactiveOpacityForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
KWayland::Client::Surface *surface;
|
||||
Test::XdgToplevel *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(QStringLiteral("org.kde.foo"));
|
||||
QVERIFY(client);
|
||||
|
@ -4275,7 +4275,7 @@ void TestXdgShellClientRules::testMatchAfterNameChange()
|
|||
RuleBook::self()->setConfig(config);
|
||||
workspace()->slotReconfigure();
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
||||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
|
|
|
@ -113,8 +113,8 @@ void TestXdgShellClient::testXdgWindowReactive()
|
|||
positioner->set_anchor_rect(10, 10, 10, 10);
|
||||
positioner->set_reactive();
|
||||
|
||||
QScopedPointer<Surface> rootSurface(Test::createSurface());
|
||||
QScopedPointer<Surface> childSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> rootSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> childSurface(Test::createSurface());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> root(Test::createXdgToplevelSurface(rootSurface.data()));
|
||||
QScopedPointer<Test::XdgPopup> popup(Test::createXdgPopupSurface(childSurface.data(), root->xdgSurface(), positioner.data()));
|
||||
|
@ -144,8 +144,8 @@ void TestXdgShellClient::testXdgWindowRepositioning()
|
|||
otherPositioner->set_size(50, 50);
|
||||
otherPositioner->set_anchor_rect(10, 10, 10, 10);
|
||||
|
||||
QScopedPointer<Surface> rootSurface(Test::createSurface());
|
||||
QScopedPointer<Surface> childSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> rootSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> childSurface(Test::createSurface());
|
||||
|
||||
QScopedPointer<Test::XdgToplevel> root(Test::createXdgToplevelSurface(rootSurface.data()));
|
||||
QScopedPointer<Test::XdgPopup> popup(Test::createXdgPopupSurface(childSurface.data(), root->xdgSurface(), positioner.data()));
|
||||
|
@ -210,7 +210,7 @@ void TestXdgShellClient::testMapUnmap()
|
|||
// associated xdg_toplevel surface is unmapped.
|
||||
|
||||
// Create a wl_surface and an xdg_toplevel, but don't commit them yet!
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(
|
||||
Test::createXdgToplevelSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly));
|
||||
|
||||
|
@ -221,7 +221,7 @@ void TestXdgShellClient::testMapUnmap()
|
|||
QVERIFY(configureRequestedSpy.isValid());
|
||||
|
||||
// Tell the compositor that we want to map the surface.
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// The compositor will respond with a configure event.
|
||||
QVERIFY(configureRequestedSpy.wait());
|
||||
|
@ -241,11 +241,11 @@ void TestXdgShellClient::testMapUnmap()
|
|||
|
||||
// Unmap the xdg_toplevel surface by committing a null buffer.
|
||||
surface->attachBuffer(Buffer::Ptr());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(Test::waitForWindowDestroyed(client));
|
||||
|
||||
// Tell the compositor that we want to re-map the xdg_toplevel surface.
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// The compositor will respond with a configure event.
|
||||
QVERIFY(configureRequestedSpy.wait());
|
||||
|
@ -271,7 +271,7 @@ void TestXdgShellClient::testMapUnmap()
|
|||
void TestXdgShellClient::testDesktopPresenceChanged()
|
||||
{
|
||||
// this test verifies that the desktop presence changed signals are properly emitted
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
|
@ -303,12 +303,12 @@ void TestXdgShellClient::testDesktopPresenceChanged()
|
|||
|
||||
void TestXdgShellClient::testWindowOutputs()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto size = QSize(200,200);
|
||||
|
||||
QSignalSpy outputEnteredSpy(surface.data(), &Surface::outputEntered);
|
||||
QSignalSpy outputLeftSpy(surface.data(), &Surface::outputLeft);
|
||||
QSignalSpy outputEnteredSpy(surface.data(), &KWayland::Client::Surface::outputEntered);
|
||||
QSignalSpy outputLeftSpy(surface.data(), &KWayland::Client::Surface::outputLeft);
|
||||
|
||||
auto c = Test::renderAndWaitForShown(surface.data(), size, Qt::blue);
|
||||
//move to be in the first screen
|
||||
|
@ -341,7 +341,7 @@ void TestXdgShellClient::testWindowOutputs()
|
|||
void TestXdgShellClient::testMinimizeActiveWindow()
|
||||
{
|
||||
// this test verifies that when minimizing the active window it gets deactivated
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<QObject> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
|
@ -383,7 +383,7 @@ void TestXdgShellClient::testFullscreen()
|
|||
|
||||
Test::XdgToplevel::States states;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(shellSurface);
|
||||
|
||||
|
@ -467,7 +467,7 @@ void TestXdgShellClient::testFullscreen()
|
|||
|
||||
void TestXdgShellClient::testUserCanSetFullscreen()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
|
@ -490,7 +490,7 @@ void TestXdgShellClient::testMaximizedToFullscreen()
|
|||
|
||||
Test::XdgToplevel::States states;
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(shellSurface);
|
||||
|
||||
|
@ -586,7 +586,7 @@ void TestXdgShellClient::testFullscreenMultipleOutputs()
|
|||
for (int i = 0; i < screens()->count(); ++i) {
|
||||
Test::XdgToplevel::States states;
|
||||
|
||||
QSharedPointer<Surface> surface(Test::createSurface());
|
||||
QSharedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QVERIFY(surface);
|
||||
QSharedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QVERIFY(shellSurface);
|
||||
|
@ -635,7 +635,7 @@ void TestXdgShellClient::testWindowOpensLargerThanScreen()
|
|||
{
|
||||
// this test creates a window which is as large as the screen, but is decorated
|
||||
// the window should get resized to fit into the screen, BUG: 366632
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
||||
// create deco
|
||||
|
@ -658,7 +658,7 @@ void TestXdgShellClient::testWindowOpensLargerThanScreen()
|
|||
void TestXdgShellClient::testHidden()
|
||||
{
|
||||
// this test verifies that when hiding window it doesn't get shown
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<QObject> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
|
@ -687,7 +687,7 @@ void TestXdgShellClient::testDesktopFileName()
|
|||
{
|
||||
QIcon::setThemeName(QStringLiteral("breeze"));
|
||||
// this test verifies that desktop file name is passed correctly to the window
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
// only xdg-shell as ShellSurface misses the setter
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
shellSurface->set_app_id(QStringLiteral("org.kde.foo"));
|
||||
|
@ -724,7 +724,7 @@ void TestXdgShellClient::testCaptionSimplified()
|
|||
{
|
||||
// this test verifies that caption is properly trimmed
|
||||
// see BUG 323798 comment #12
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
// only done for xdg-shell as ShellSurface misses the setter
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
const QString origTitle = QString::fromUtf8(QByteArrayLiteral("Was tun, wenn Schüler Autismus haben?\342\200\250\342\200\250\342\200\250 – Marlies Hübner - Mozilla Firefox"));
|
||||
|
@ -737,7 +737,7 @@ void TestXdgShellClient::testCaptionSimplified()
|
|||
|
||||
void TestXdgShellClient::testCaptionMultipleWindows()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
shellSurface->set_title(QStringLiteral("foo"));
|
||||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
|
@ -746,7 +746,7 @@ void TestXdgShellClient::testCaptionMultipleWindows()
|
|||
QCOMPARE(c->captionNormal(), QStringLiteral("foo"));
|
||||
QCOMPARE(c->captionSuffix(), QString());
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface2(Test::createXdgToplevelSurface(surface2.data()));
|
||||
shellSurface2->set_title(QStringLiteral("foo"));
|
||||
auto c2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
|
@ -755,7 +755,7 @@ void TestXdgShellClient::testCaptionMultipleWindows()
|
|||
QCOMPARE(c2->captionNormal(), QStringLiteral("foo"));
|
||||
QCOMPARE(c2->captionSuffix(), QStringLiteral(" <2>"));
|
||||
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface3(Test::createXdgToplevelSurface(surface3.data()));
|
||||
shellSurface3->set_title(QStringLiteral("foo"));
|
||||
auto c3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
|
@ -764,7 +764,7 @@ void TestXdgShellClient::testCaptionMultipleWindows()
|
|||
QCOMPARE(c3->captionNormal(), QStringLiteral("foo"));
|
||||
QCOMPARE(c3->captionSuffix(), QStringLiteral(" <3>"));
|
||||
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface4(Test::createXdgToplevelSurface(surface4.data()));
|
||||
shellSurface4->set_title(QStringLiteral("bar"));
|
||||
auto c4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
|
@ -871,7 +871,7 @@ void TestXdgShellClient::testAppMenu()
|
|||
//register a faux appmenu client
|
||||
QVERIFY (QDBusConnection::sessionBus().registerService("org.kde.kappmenu"));
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
|
@ -889,7 +889,7 @@ void TestXdgShellClient::testAppMenu()
|
|||
void TestXdgShellClient::testNoDecorationModeRequested()
|
||||
{
|
||||
// this test verifies that the decoration follows the default mode if no mode is explicitly requested
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QScopedPointer<ServerSideDecoration> deco(Test::waylandServerSideDecoration()->create(surface.data()));
|
||||
QSignalSpy decoSpy(deco.data(), &ServerSideDecoration::modeChanged);
|
||||
|
@ -913,14 +913,14 @@ void TestXdgShellClient::testSendClientWithTransientToDesktop()
|
|||
vds->setCount(2);
|
||||
const QVector<VirtualDesktop *> desktops = vds->desktops();
|
||||
|
||||
QScopedPointer<Surface> surface{Test::createSurface()};
|
||||
QScopedPointer<KWayland::Client::Surface> surface{Test::createSurface()};
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
|
||||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
|
||||
// let's create a transient window
|
||||
QScopedPointer<Surface> transientSurface{Test::createSurface()};
|
||||
QScopedPointer<KWayland::Client::Surface> transientSurface{Test::createSurface()};
|
||||
QScopedPointer<Test::XdgToplevel> transientShellSurface(Test::createXdgToplevelSurface(transientSurface.data()));
|
||||
transientShellSurface->set_parent(shellSurface->object());
|
||||
|
||||
|
@ -962,14 +962,14 @@ void TestXdgShellClient::testMinimizeWindowWithTransients()
|
|||
// transients will be minimized/unminimized as well
|
||||
|
||||
// create the main window
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
QVERIFY(!c->isMinimized());
|
||||
|
||||
// create a transient window
|
||||
QScopedPointer<Surface> transientSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> transientSurface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> transientShellSurface(Test::createXdgToplevelSurface(transientSurface.data()));
|
||||
transientShellSurface->set_parent(shellSurface->object());
|
||||
auto transient = Test::renderAndWaitForShown(transientSurface.data(), QSize(100, 50), Qt::red);
|
||||
|
@ -1000,7 +1000,7 @@ void TestXdgShellClient::testXdgDecoration_data()
|
|||
|
||||
void TestXdgShellClient::testXdgDecoration()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
QScopedPointer<Test::XdgToplevelDecorationV1> deco(Test::createXdgToplevelDecorationV1(shellSurface.data()));
|
||||
|
||||
|
@ -1029,17 +1029,17 @@ void TestXdgShellClient::testXdgDecoration()
|
|||
void TestXdgShellClient::testXdgNeverCommitted()
|
||||
{
|
||||
//check we don't crash if we create a shell object but delete the XdgShellClient before committing it
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly));
|
||||
}
|
||||
|
||||
void TestXdgShellClient::testXdgInitialState()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly));
|
||||
QSignalSpy toplevelConfigureRequestedSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
surfaceConfigureRequestedSpy.wait();
|
||||
QCOMPARE(surfaceConfigureRequestedSpy.count(), 1);
|
||||
|
@ -1056,13 +1056,13 @@ void TestXdgShellClient::testXdgInitialState()
|
|||
|
||||
void TestXdgShellClient::testXdgInitiallyMaximised()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly));
|
||||
QSignalSpy toplevelConfigureRequestedSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
|
||||
shellSurface->set_maximized();
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
surfaceConfigureRequestedSpy.wait();
|
||||
|
||||
|
@ -1083,13 +1083,13 @@ void TestXdgShellClient::testXdgInitiallyMaximised()
|
|||
|
||||
void TestXdgShellClient::testXdgInitiallyFullscreen()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly));
|
||||
QSignalSpy toplevelConfigureRequestedSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
|
||||
shellSurface->set_fullscreen(nullptr);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
surfaceConfigureRequestedSpy.wait();
|
||||
|
||||
|
@ -1110,12 +1110,12 @@ void TestXdgShellClient::testXdgInitiallyFullscreen()
|
|||
|
||||
void TestXdgShellClient::testXdgInitiallyMinimized()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly));
|
||||
QSignalSpy toplevelConfigureRequestedSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
shellSurface->set_minimized();
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
surfaceConfigureRequestedSpy.wait();
|
||||
QCOMPARE(surfaceConfigureRequestedSpy.count(), 1);
|
||||
|
@ -1140,7 +1140,7 @@ void TestXdgShellClient::testXdgWindowGeometryIsntSet()
|
|||
// bounding rectangle of the main surface and its sub-surfaces if no window
|
||||
// geometry is set by the client.
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
QVERIFY(client);
|
||||
|
@ -1158,12 +1158,12 @@ void TestXdgShellClient::testXdgWindowGeometryIsntSet()
|
|||
QCOMPARE(client->bufferGeometry().topLeft(), oldPosition);
|
||||
QCOMPARE(client->bufferGeometry().size(), QSize(100, 50));
|
||||
|
||||
QScopedPointer<Surface> childSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> childSurface(Test::createSurface());
|
||||
QScopedPointer<SubSurface> subSurface(Test::createSubSurface(childSurface.data(), surface.data()));
|
||||
QVERIFY(subSurface);
|
||||
subSurface->setPosition(QPoint(-20, -10));
|
||||
Test::render(childSurface.data(), QSize(100, 50), Qt::blue);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(frameGeometryChangedSpy.wait());
|
||||
QCOMPARE(client->frameGeometry().topLeft(), oldPosition);
|
||||
QCOMPARE(client->frameGeometry().size(), QSize(120, 60));
|
||||
|
@ -1178,7 +1178,7 @@ void TestXdgShellClient::testXdgWindowGeometryAttachBuffer()
|
|||
// again. Notice that the window geometry must remain the same even if the new
|
||||
// buffer is smaller.
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
QVERIFY(client);
|
||||
|
@ -1190,7 +1190,7 @@ void TestXdgShellClient::testXdgWindowGeometryAttachBuffer()
|
|||
QSignalSpy frameGeometryChangedSpy(client, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
shellSurface->xdgSurface()->set_window_geometry(10, 10, 180, 80);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(frameGeometryChangedSpy.wait());
|
||||
QCOMPARE(frameGeometryChangedSpy.count(), 1);
|
||||
QCOMPARE(client->frameGeometry().topLeft(), oldPosition);
|
||||
|
@ -1207,7 +1207,7 @@ void TestXdgShellClient::testXdgWindowGeometryAttachBuffer()
|
|||
QCOMPARE(client->bufferGeometry().size(), QSize(100, 50));
|
||||
|
||||
shellSurface->xdgSurface()->set_window_geometry(0, 0, 100, 50);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(frameGeometryChangedSpy.wait());
|
||||
QCOMPARE(frameGeometryChangedSpy.count(), 3);
|
||||
QCOMPARE(client->frameGeometry().topLeft(), oldPosition);
|
||||
|
@ -1225,7 +1225,7 @@ void TestXdgShellClient::testXdgWindowGeometryAttachSubSurface()
|
|||
// when a new sub-surface is added and xdg_surface.set_window_geometry is
|
||||
// not called again.
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
QVERIFY(client);
|
||||
|
@ -1237,26 +1237,26 @@ void TestXdgShellClient::testXdgWindowGeometryAttachSubSurface()
|
|||
QSignalSpy frameGeometryChangedSpy(client, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
shellSurface->xdgSurface()->set_window_geometry(10, 10, 180, 80);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(frameGeometryChangedSpy.wait());
|
||||
QCOMPARE(client->frameGeometry().topLeft(), oldPosition);
|
||||
QCOMPARE(client->frameGeometry().size(), QSize(180, 80));
|
||||
QCOMPARE(client->bufferGeometry().topLeft(), oldPosition - QPoint(10, 10));
|
||||
QCOMPARE(client->bufferGeometry().size(), QSize(200, 100));
|
||||
|
||||
QScopedPointer<Surface> childSurface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> childSurface(Test::createSurface());
|
||||
QScopedPointer<SubSurface> subSurface(Test::createSubSurface(childSurface.data(), surface.data()));
|
||||
QVERIFY(subSurface);
|
||||
subSurface->setPosition(QPoint(-20, -20));
|
||||
Test::render(childSurface.data(), QSize(100, 50), Qt::blue);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QCOMPARE(client->frameGeometry().topLeft(), oldPosition);
|
||||
QCOMPARE(client->frameGeometry().size(), QSize(180, 80));
|
||||
QCOMPARE(client->bufferGeometry().topLeft(), oldPosition - QPoint(10, 10));
|
||||
QCOMPARE(client->bufferGeometry().size(), QSize(200, 100));
|
||||
|
||||
shellSurface->xdgSurface()->set_window_geometry(-15, -15, 50, 40);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(frameGeometryChangedSpy.wait());
|
||||
QCOMPARE(client->frameGeometry().topLeft(), oldPosition);
|
||||
QCOMPARE(client->frameGeometry().size(), QSize(50, 40));
|
||||
|
@ -1269,7 +1269,7 @@ void TestXdgShellClient::testXdgWindowGeometryInteractiveResize()
|
|||
// This test verifies that correct window geometry is provided along each
|
||||
// configure event when an xdg-shell is being interactively resized.
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
QVERIFY(client);
|
||||
|
@ -1286,7 +1286,7 @@ void TestXdgShellClient::testXdgWindowGeometryInteractiveResize()
|
|||
QSignalSpy frameGeometryChangedSpy(client, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
shellSurface->xdgSurface()->set_window_geometry(10, 10, 180, 80);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(frameGeometryChangedSpy.wait());
|
||||
QCOMPARE(client->bufferGeometry().size(), QSize(200, 100));
|
||||
QCOMPARE(client->frameGeometry().size(), QSize(180, 80));
|
||||
|
@ -1362,7 +1362,7 @@ void TestXdgShellClient::testXdgWindowGeometryFullScreen()
|
|||
// This test verifies that an xdg-shell receives correct window geometry when
|
||||
// its fullscreen state gets changed.
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
QVERIFY(client);
|
||||
|
@ -1379,7 +1379,7 @@ void TestXdgShellClient::testXdgWindowGeometryFullScreen()
|
|||
QSignalSpy frameGeometryChangedSpy(client, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
shellSurface->xdgSurface()->set_window_geometry(10, 10, 180, 80);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(frameGeometryChangedSpy.wait());
|
||||
QCOMPARE(client->bufferGeometry().size(), QSize(200, 100));
|
||||
QCOMPARE(client->frameGeometry().size(), QSize(180, 80));
|
||||
|
@ -1419,7 +1419,7 @@ void TestXdgShellClient::testXdgWindowGeometryMaximize()
|
|||
// This test verifies that an xdg-shell receives correct window geometry when
|
||||
// its maximized state gets changed.
|
||||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
QVERIFY(client);
|
||||
|
@ -1436,7 +1436,7 @@ void TestXdgShellClient::testXdgWindowGeometryMaximize()
|
|||
QSignalSpy frameGeometryChangedSpy(client, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
shellSurface->xdgSurface()->set_window_geometry(10, 10, 180, 80);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
QVERIFY(frameGeometryChangedSpy.wait());
|
||||
QCOMPARE(client->bufferGeometry().size(), QSize(200, 100));
|
||||
QCOMPARE(client->frameGeometry().size(), QSize(180, 80));
|
||||
|
@ -1487,7 +1487,7 @@ void TestXdgShellClient::testPointerInputTransform()
|
|||
QVERIFY(pointerMotionSpy.isValid());
|
||||
|
||||
// Create an xdg_toplevel surface and wait for the compositor to catch up.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
QVERIFY(client);
|
||||
|
@ -1536,7 +1536,7 @@ void TestXdgShellClient::testReentrantSetFrameGeometry()
|
|||
// to the frameGeometryChanged() signal won't cause an infinite recursion.
|
||||
|
||||
// Create an xdg-toplevel surface and wait for the compositor to catch up.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
QVERIFY(client);
|
||||
|
@ -1564,10 +1564,10 @@ void TestXdgShellClient::testDoubleMaximize()
|
|||
// separated by the initial commit is handled properly.
|
||||
|
||||
// Create the test surface.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<KWayland::Client::Surface> surface(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface(Test::createXdgToplevelSurface(surface.data()));
|
||||
shellSurface->set_maximized();
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// Wait for the compositor to respond with a configure event.
|
||||
QSignalSpy toplevelConfigureRequestedSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested);
|
||||
|
@ -1582,7 +1582,7 @@ void TestXdgShellClient::testDoubleMaximize()
|
|||
|
||||
// Send another set_maximized() request, but do not attach any buffer yet.
|
||||
shellSurface->set_maximized();
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// The compositor must respond with another configure event even if the state hasn't changed.
|
||||
QVERIFY(surfaceConfigureRequestedSpy.wait());
|
||||
|
@ -1596,14 +1596,14 @@ void TestXdgShellClient::testDoubleMaximize()
|
|||
void TestXdgShellClient::testMaximizeHorizontal()
|
||||
{
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
||||
QSignalSpy toplevelConfigureRequestedSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// Wait for the initial configure event.
|
||||
Test::XdgToplevel::States states;
|
||||
|
@ -1678,14 +1678,14 @@ void TestXdgShellClient::testMaximizeHorizontal()
|
|||
void TestXdgShellClient::testMaximizeVertical()
|
||||
{
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
||||
QSignalSpy toplevelConfigureRequestedSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// Wait for the initial configure event.
|
||||
Test::XdgToplevel::States states;
|
||||
|
@ -1760,14 +1760,14 @@ void TestXdgShellClient::testMaximizeVertical()
|
|||
void TestXdgShellClient::testMaximizeFull()
|
||||
{
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface;
|
||||
QScopedPointer<KWayland::Client::Surface> surface;
|
||||
surface.reset(Test::createSurface());
|
||||
QScopedPointer<Test::XdgToplevel> shellSurface;
|
||||
shellSurface.reset(Test::createXdgToplevelSurface(surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
|
||||
|
||||
QSignalSpy toplevelConfigureRequestedSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested);
|
||||
QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested);
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
surface->commit(KWayland::Client::Surface::CommitFlag::None);
|
||||
|
||||
// Wait for the initial configure event.
|
||||
Test::XdgToplevel::States states;
|
||||
|
|
Loading…
Reference in a new issue