Commit 9cce7f86 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[wayland] Drop support for legacy xdg-shell-v6 protocol

Summary:
xdg-shell stable has been around for quite a while. A quick analysis
showed that many distros ship GTK and Qt that support both xdg-shell
v6 and stable. Therefore, we can drop support for legacy v6 protocol.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28118
parent e7babb3e
......@@ -115,7 +115,6 @@ void TestDbusInterface::testGetWindowInfoXdgShellClient_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -299,7 +299,6 @@ void DebugConsoleTest::testWaylandClient_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -179,9 +179,6 @@ void DecorationInputTest::testAxis_data()
QTest::addColumn<Qt::WindowFrameSection>("expectedSection");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("topLeft|xdgv6") << QPoint(0, 0) << Qt::TopLeftSection << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("top|xdgv6") << QPoint(250, 0) << Qt::TopSection << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("topRight|xdgv6") << QPoint(499, 0) << Qt::TopRightSection << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("topLeft|xdgWmBase") << QPoint(0, 0) << Qt::TopLeftSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("top|xdgWmBase") << QPoint(250, 0) << Qt::TopSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("topRight|xdgWmBase") << QPoint(499, 0) << Qt::TopRightSection << Test::XdgShellSurfaceType::XdgShellStable;
......@@ -233,9 +230,6 @@ void DecorationInputTest::testDoubleClick_data()
QTest::addColumn<Qt::WindowFrameSection>("expectedSection");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("topLeft|xdgv6") << QPoint(0, 0) << Qt::TopLeftSection << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("top|xdgv6") << QPoint(250, 0) << Qt::TopSection << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("topRight|xdgv6") << QPoint(499, 0) << Qt::TopRightSection << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("topLeft|xdgWmBase") << QPoint(0, 0) << Qt::TopLeftSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("top|xdgWmBase") << QPoint(250, 0) << Qt::TopSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("topRight|xdgWmBase") << QPoint(499, 0) << Qt::TopRightSection << Test::XdgShellSurfaceType::XdgShellStable;
......@@ -288,9 +282,6 @@ void DecorationInputTest::testDoubleTap_data()
QTest::addColumn<Qt::WindowFrameSection>("expectedSection");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("topLeft|xdgv6") << QPoint(10, 10) << Qt::TopLeftSection << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("top|xdgv6") << QPoint(260, 10) << Qt::TopSection << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("topRight|xdgv6") << QPoint(509, 10) << Qt::TopRightSection << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("topLeft|xdgWmBase") << QPoint(10, 10) << Qt::TopLeftSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("top|xdgWmBase") << QPoint(260, 10) << Qt::TopSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("topRight|xdgWmBase") << QPoint(509, 10) << Qt::TopRightSection << Test::XdgShellSurfaceType::XdgShellStable;
......@@ -343,7 +334,6 @@ void DecorationInputTest::testHover_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -402,10 +392,6 @@ void DecorationInputTest::testPressToMove_data()
QTest::addColumn<QPoint>("offset3");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("To right|xdgv6") << QPoint(10, 0) << QPoint(20, 0) << QPoint(30, 0) << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("To left|xdgv6") << QPoint(-10, 0) << QPoint(-20, 0) << QPoint(-30, 0) << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("To bottom|xdgv6") << QPoint(0, 10) << QPoint(0, 20) << QPoint(0, 30) << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("To top|xdgv6") << QPoint(0, -10) << QPoint(0, -20) << QPoint(0, -30) << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("To right|xdgWmBase") << QPoint(10, 0) << QPoint(20, 0) << QPoint(30, 0) << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("To left|xdgWmBase") << QPoint(-10, 0) << QPoint(-20, 0) << QPoint(-30, 0) << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("To bottom|xdgWmBase") << QPoint(0, 10) << QPoint(0, 20) << QPoint(0, 30) << Test::XdgShellSurfaceType::XdgShellStable;
......@@ -467,10 +453,6 @@ void DecorationInputTest::testTapToMove_data()
QTest::addColumn<QPoint>("offset3");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("To right|xdgv6") << QPoint(10, 0) << QPoint(20, 0) << QPoint(30, 0) << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("To left|xdgv6") << QPoint(-10, 0) << QPoint(-20, 0) << QPoint(-30, 0) << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("To bottom|xdgv6") << QPoint(0, 10) << QPoint(0, 20) << QPoint(0, 30) << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("To top|xdgv6") << QPoint(0, -10) << QPoint(0, -20) << QPoint(0, -30) << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("To right|xdgWmBase") << QPoint(10, 0) << QPoint(20, 0) << QPoint(30, 0) << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("To left|xdgWmBase") << QPoint(-10, 0) << QPoint(-20, 0) << QPoint(-30, 0) << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("To bottom|xdgWmBase") << QPoint(0, 10) << QPoint(0, 20) << QPoint(0, 30) << Test::XdgShellSurfaceType::XdgShellStable;
......@@ -532,11 +514,8 @@ void DecorationInputTest::testResizeOutsideWindow_data()
QTest::addColumn<Qt::Edge>("edge");
QTest::addColumn<Qt::CursorShape>("expectedCursor");
QTest::newRow("xdgShellV6 - left") << Test::XdgShellSurfaceType::XdgShellV6 << Qt::LeftEdge << Qt::SizeHorCursor;
QTest::newRow("xdgWmBase - left") << Test::XdgShellSurfaceType::XdgShellStable << Qt::LeftEdge << Qt::SizeHorCursor;
QTest::newRow("xdgShellV6 - right") << Test::XdgShellSurfaceType::XdgShellV6 << Qt::RightEdge << Qt::SizeHorCursor;
QTest::newRow("xdgWmBase - right") << Test::XdgShellSurfaceType::XdgShellStable << Qt::RightEdge << Qt::SizeHorCursor;
QTest::newRow("xdgShellV6 - bottom") << Test::XdgShellSurfaceType::XdgShellV6 << Qt::BottomEdge << Qt::SizeVerCursor;
QTest::newRow("xdgWmBase - bottom") << Test::XdgShellSurfaceType::XdgShellStable << Qt::BottomEdge << Qt::SizeVerCursor;
}
......@@ -601,7 +580,6 @@ void DecorationInputTest::testModifierClickUnrestrictedMove_data()
const QString meta = QStringLiteral("Meta");
const QVector<std::pair<Test::XdgShellSurfaceType, QByteArray>> surfaceTypes{
{ Test::XdgShellSurfaceType::XdgShellV6, QByteArrayLiteral("XdgShellV6") },
{ Test::XdgShellSurfaceType::XdgShellStable, QByteArrayLiteral("XdgWmBase") },
};
......@@ -699,7 +677,6 @@ void DecorationInputTest::testModifierScrollOpacity_data()
const QString meta = QStringLiteral("Meta");
const QVector<std::pair<Test::XdgShellSurfaceType, QByteArray>> surfaceTypes{
{ Test::XdgShellSurfaceType::XdgShellV6, QByteArrayLiteral("XdgShellV6") },
{ Test::XdgShellSurfaceType::XdgShellStable, QByteArrayLiteral("XdgWmBase") },
};
......@@ -761,7 +738,6 @@ void DecorationInputTest::testTouchEvents_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -835,7 +811,6 @@ void DecorationInputTest::testTooltipDoesntEatKeyEvents_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -88,7 +88,6 @@ void DontCrashCursorPhysicalSizeEmpty::testMoveCursorOverDeco_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -99,7 +99,6 @@ void DontCrashNoBorder::testCreateWindow_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -116,7 +116,6 @@ void FadeTest::testWindowCloseAfterWindowHidden_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -97,7 +97,6 @@ void MaximizeAnimationTest::testMaximizeRestore_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -211,7 +211,7 @@ void ScriptedEffectsTest::testEffectsHandler()
using namespace KWayland::Client;
auto *surface = Test::createSurface(Test::waylandCompositor());
QVERIFY(surface);
auto *shellSurface = Test::createXdgShellV6Surface(surface, surface);
auto *shellSurface = Test::createXdgShellStableSurface(surface, surface);
QVERIFY(shellSurface);
shellSurface->setTitle("WindowA");
auto *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
......@@ -290,7 +290,7 @@ void ScriptedEffectsTest::testAnimations()
using namespace KWayland::Client;
auto *surface = Test::createSurface(Test::waylandCompositor());
QVERIFY(surface);
auto *shellSurface = Test::createXdgShellV6Surface(surface, surface);
auto *shellSurface = Test::createXdgShellStableSurface(surface, surface);
QVERIFY(shellSurface);
shellSurface->setTitle("Window 1");
auto *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
......@@ -398,7 +398,7 @@ void ScriptedEffectsTest::testFullScreenEffect()
using namespace KWayland::Client;
auto *surface = Test::createSurface(Test::waylandCompositor());
QVERIFY(surface);
auto *shellSurface = Test::createXdgShellV6Surface(surface, surface);
auto *shellSurface = Test::createXdgShellStableSurface(surface, surface);
QVERIFY(shellSurface);
shellSurface->setTitle("Window 1");
auto *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
......@@ -462,7 +462,7 @@ void ScriptedEffectsTest::testKeepAlive()
using namespace KWayland::Client;
auto *surface = Test::createSurface(Test::waylandCompositor());
QVERIFY(surface);
auto *shellSurface = Test::createXdgShellV6Surface(surface, surface);
auto *shellSurface = Test::createXdgShellStableSurface(surface, surface);
QVERIFY(shellSurface);
auto *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
QVERIFY(c);
......
......@@ -85,7 +85,6 @@ void TestIdleInhibition::testInhibit_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -102,7 +102,6 @@ void InputStackingOrderTest::testPointerFocusUpdatesOnStackingOrderChange_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -133,7 +133,6 @@ KWayland::Client::Surface *createSurface(QObject *parent = nullptr);
KWayland::Client::SubSurface *createSubSurface(KWayland::Client::Surface *surface,
KWayland::Client::Surface *parentSurface, QObject *parent = nullptr);
enum class XdgShellSurfaceType {
XdgShellV6,
XdgShellStable
};
......@@ -147,9 +146,6 @@ KWayland::Client::XdgShellSurface *createXdgShellSurface(XdgShellSurfaceType typ
QObject *parent = nullptr,
CreationSetup creationSetup = CreationSetup::CreateAndConfigure);
KWayland::Client::XdgShellSurface *createXdgShellV6Surface(KWayland::Client::Surface *surface,
QObject *parent = nullptr,
CreationSetup = CreationSetup::CreateAndConfigure);
KWayland::Client::XdgShellSurface *createXdgShellStableSurface(KWayland::Client::Surface *surface,
QObject *parent = nullptr,
CreationSetup = CreationSetup::CreateAndConfigure);
......
......@@ -550,7 +550,6 @@ void MoveResizeWindowTest::testClientSideMove_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -252,7 +252,6 @@ void PlasmaSurfaceTest::testOSDPlacementManualPosition_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgv6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -289,13 +288,9 @@ void PlasmaSurfaceTest::testPanelTypeHasStrut_data()
QTest::addColumn<QRect>("expectedMaxArea");
QTest::addColumn<KWin::Layer>("expectedLayer");
QTest::newRow("always visible - xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::AlwaysVisible << true << QRect(0, 50, 1280, 974) << KWin::DockLayer;
QTest::newRow("always visible - xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable << PlasmaShellSurface::PanelBehavior::AlwaysVisible << true << QRect(0, 50, 1280, 974) << KWin::DockLayer;
QTest::newRow("autohide - xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::AutoHide << false << QRect(0, 0, 1280, 1024) << KWin::AboveLayer;
QTest::newRow("autohide - xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable << PlasmaShellSurface::PanelBehavior::AutoHide << false << QRect(0, 0, 1280, 1024) << KWin::AboveLayer;
QTest::newRow("windows can cover - xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::WindowsCanCover << false << QRect(0, 0, 1280, 1024) << KWin::NormalLayer;
QTest::newRow("windows can cover - xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable << PlasmaShellSurface::PanelBehavior::WindowsCanCover << false << QRect(0, 0, 1280, 1024) << KWin::NormalLayer;
QTest::newRow("windows go below - xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::WindowsGoBelow << false << QRect(0, 0, 1280, 1024) << KWin::DockLayer;
QTest::newRow("windows go below - xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable << PlasmaShellSurface::PanelBehavior::WindowsGoBelow << false << QRect(0, 0, 1280, 1024) << KWin::DockLayer;
}
......
......@@ -118,10 +118,6 @@ void TestPointerConstraints::testConfinedPointer_data()
PointerFunc topRight = &QRect::topRight;
PointerFunc topLeft = &QRect::topLeft;
QTest::newRow("XdgShellV6 - bottomLeft") << Test::XdgShellSurfaceType::XdgShellV6 << bottomLeft << -1 << 1;
QTest::newRow("XdgShellV6 - bottomRight") << Test::XdgShellSurfaceType::XdgShellV6 << bottomRight << 1 << 1;
QTest::newRow("XdgShellV6 - topLeft") << Test::XdgShellSurfaceType::XdgShellV6 << topLeft << -1 << -1;
QTest::newRow("XdgShellV6 - topRight") << Test::XdgShellSurfaceType::XdgShellV6 << topRight << 1 << -1;
QTest::newRow("XdgWmBase - bottomLeft") << Test::XdgShellSurfaceType::XdgShellStable << bottomLeft << -1 << 1;
QTest::newRow("XdgWmBase - bottomRight") << Test::XdgShellSurfaceType::XdgShellStable << bottomRight << 1 << 1;
QTest::newRow("XdgWmBase - topLeft") << Test::XdgShellSurfaceType::XdgShellStable << topLeft << -1 << -1;
......@@ -291,7 +287,6 @@ void TestPointerConstraints::testLockedPointer_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -368,7 +363,6 @@ void TestPointerConstraints::testCloseWindowWithLockedPointer_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("XdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("XdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -415,7 +415,7 @@ void QuickTilingTest::testQuickTilingPointerMove()
QScopedPointer<Surface> surface(Test::createSurface());
QVERIFY(!surface.isNull());
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellV6Surface(
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(
surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
QVERIFY(!shellSurface.isNull());
......@@ -487,7 +487,7 @@ void QuickTilingTest::testQuickTilingTouchMove()
QVERIFY(!surface.isNull());
QScopedPointer<ServerSideDecoration> deco(Test::waylandServerSideDecoration()->create(surface.data()));
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellV6Surface(
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(
surface.data(), surface.data(), Test::CreationSetup::CreateOnly));
QVERIFY(!shellSurface.isNull());
......
......@@ -152,7 +152,6 @@ void SceneQPainterTest::testWindow_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -255,7 +254,6 @@ void SceneQPainterTest::testCompositorRestart_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -67,7 +67,6 @@ static struct {
SubCompositor *subCompositor = nullptr;
ServerSideDecorationManager *decoration = nullptr;
ShadowManager *shadowManager = nullptr;
XdgShell *xdgShellV6 = nullptr;
XdgShell *xdgShellStable = nullptr;
ShmPool *shm = nullptr;
Seat *seat = nullptr;
......@@ -154,10 +153,6 @@ bool setupWaylandConnection(AdditionalWaylandInterfaces flags)
if (!s_waylandConnection.shm->isValid()) {
return false;
}
s_waylandConnection.xdgShellV6 = registry->createXdgShell(registry->interface(Registry::Interface::XdgShellUnstableV6).name, registry->interface(Registry::Interface::XdgShellUnstableV6).version);
if (!s_waylandConnection.xdgShellV6->isValid()) {
return false;
}
s_waylandConnection.xdgShellStable = registry->createXdgShell(registry->interface(Registry::Interface::XdgShellStable).name, registry->interface(Registry::Interface::XdgShellStable).version);
if (!s_waylandConnection.xdgShellStable->isValid()) {
return false;
......@@ -244,8 +239,6 @@ void destroyWaylandConnection()
s_waylandConnection.seat = nullptr;
delete s_waylandConnection.pointerConstraints;
s_waylandConnection.pointerConstraints = nullptr;
delete s_waylandConnection.xdgShellV6;
s_waylandConnection.xdgShellV6 = nullptr;
delete s_waylandConnection.xdgShellStable;
s_waylandConnection.xdgShellStable = nullptr;
delete s_waylandConnection.shadowManager;
......@@ -451,22 +444,6 @@ SubSurface *createSubSurface(Surface *surface, Surface *parentSurface, QObject *
return s;
}
XdgShellSurface *createXdgShellV6Surface(Surface *surface, QObject *parent, CreationSetup creationSetup)
{
if (!s_waylandConnection.xdgShellV6) {
return nullptr;
}
auto s = s_waylandConnection.xdgShellV6->createSurface(surface, parent);
if (!s->isValid()) {
delete s;
return nullptr;
}
if (creationSetup == CreationSetup::CreateAndConfigure) {
initXdgShellSurface(surface, s);
}
return s;
}
XdgShellSurface *createXdgShellStableSurface(Surface *surface, QObject *parent, CreationSetup creationSetup)
{
if (!s_waylandConnection.xdgShellStable) {
......@@ -522,8 +499,6 @@ void initXdgShellPopup(KWayland::Client::Surface *surface, KWayland::Client::Xdg
KWayland::Client::XdgShellSurface *createXdgShellSurface(XdgShellSurfaceType type, KWayland::Client::Surface *surface, QObject *parent, CreationSetup creationSetup)
{
switch (type) {
case XdgShellSurfaceType::XdgShellV6:
return createXdgShellV6Surface(surface, parent, creationSetup);
case XdgShellSurfaceType::XdgShellStable:
return createXdgShellStableSurface(surface, parent, creationSetup);
default:
......
......@@ -133,7 +133,6 @@ void VirtualDesktopTest::testLastDesktopRemoved_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -177,7 +176,6 @@ void VirtualDesktopTest::testWindowOnMultipleDesktops_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -265,7 +263,6 @@ void VirtualDesktopTest::testRemoveDesktopWithWindow_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -265,7 +265,6 @@ void TestXdgShellClientRules::cleanup()
void TestXdgShellClientRules::name##_data() \
{ \
QTest::addColumn<Test::XdgShellSurfaceType>("type"); \
QTest::newRow("XdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; \
QTest::newRow("XdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; \
}
......@@ -4524,7 +4523,7 @@ void TestXdgShellClientRules::testMatchAfterNameChange()
workspace()->slotReconfigure();
QScopedPointer<Surface> surface(Test::createSurface());
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellV6Surface(surface.data()));
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
QVERIFY(c);
......
......@@ -162,7 +162,6 @@ void TestXdgShellClient::testMapUnmapMap_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -338,7 +337,6 @@ void TestXdgShellClient::testWindowOutputs_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -384,7 +382,6 @@ void TestXdgShellClient::testMinimizeActiveWindow_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -425,10 +422,8 @@ void TestXdgShellClient::testFullscreen_data()
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::addColumn<ServerSideDecoration::Mode>("decoMode");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Client;
QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Client;
QTest::newRow("xdgShellV6 - deco") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Server;
QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server;
}
......@@ -502,7 +497,6 @@ void TestXdgShellClient::testFullscreenRestore_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -563,7 +557,6 @@ void TestXdgShellClient::testUserCanSetFullscreen_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -583,7 +576,6 @@ void TestXdgShellClient::testUserSetFullscreen_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -646,10 +638,8 @@ void TestXdgShellClient::testMaximizedToFullscreen_data()
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::addColumn<ServerSideDecoration::Mode>("decoMode");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Client;
QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Client;
QTest::newRow("xdgShellV6 - deco") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Server;
QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server;
}
......@@ -738,7 +728,6 @@ void TestXdgShellClient::testWindowOpensLargerThanScreen_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -774,7 +763,6 @@ void TestXdgShellClient::testHidden_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -911,10 +899,8 @@ void TestXdgShellClient::testUnresponsiveWindow_data()
QTest::addColumn<QString>("shellInterface");//see env selection in qwaylandintegration.cpp
QTest::addColumn<bool>("socketMode");
QTest::newRow("xdgv6 display") << "xdg-shell-v6" << false;
QTest::newRow("xdgv6 socket") << "xdg-shell-v6" << true;
//TODO add XDG WM Base when Kwin relies on Qt 5.12
QTest::newRow("xdg display") << "xdg-shell" << false;
QTest::newRow("xdg socket") << "xdg-shell" << true;
}
void TestXdgShellClient::testUnresponsiveWindow()
......@@ -996,7 +982,6 @@ void TestXdgShellClient::testX11WindowId_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -1035,7 +1020,6 @@ void TestXdgShellClient::testNoDecorationModeRequested_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -1063,7 +1047,6 @@ void TestXdgShellClient::testSendClientWithTransientToDesktop_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -1118,7 +1101,6 @@ void TestXdgShellClient::testMinimizeWindowWithTransients_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -315,11 +315,6 @@ bool WaylandServer::init(const QByteArray &socketName, InitializationFlags flags
}
);
m_xdgShell6 = m_display->createXdgShell(XdgShellInterfaceVersion::UnstableV6, m_display);
m_xdgShell6->create();
connect(m_xdgShell6, &XdgShellInterface::surfaceCreated, this, &WaylandServer::createSurface<XdgShellSurfaceInterface>);
connect(m_xdgShell6, &XdgShellInterface::xdgPopupCreated, this, &WaylandServer::createSurface<XdgShellPopupInterface>);
m_xdgShell = m_display->createXdgShell(XdgShellInterfaceVersion::Stable, m_display);
m_xdgShell->create();
connect(m_xdgShell, &XdgShellInterface::surfaceCreated, this, &WaylandServer::createSurface<XdgShellSurfaceInterface>);
......
......@@ -247,7 +247,6 @@ private:
KWayland::Server::CompositorInterface *m_compositor = nullptr;
KWayland::Server::SeatInterface *m_seat = nullptr;
KWayland::Server::DataDeviceManagerInterface *m_dataDeviceManager = nullptr;
KWayland::Server::XdgShellInterface *m_xdgShell6 = nullptr;
KWayland::Server::XdgShellInterface *m_xdgShell = nullptr;
KWayland::Server::PlasmaShellInterface *m_plasmaShell = nullptr;
KWayland::Server::PlasmaWindowManagementInterface *m_windowManagement = nullptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment