Commit 665ec0a5 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii Committed by Vlad Zahorodnii
Browse files

[wayland] Drop xdg-shell v5 support

Summary:
Drop xdg-shell v5 support since this protocol is obsolete and all popular
wayland compositors already did that.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23573
parent 973f873d
......@@ -116,7 +116,6 @@ void TestDbusInterface::testGetWindowInfoShellClient_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -300,7 +300,6 @@ void DebugConsoleTest::testWaylandClient_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -181,9 +181,6 @@ void DecorationInputTest::testAxis_data()
QTest::addColumn<Qt::WindowFrameSection>("expectedSection");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("topLeft|xdgv5") << QPoint(0, 0) << Qt::TopLeftSection << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("top|xdgv5") << QPoint(250, 0) << Qt::TopSection << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("topRight|xdgv5") << QPoint(499, 0) << Qt::TopRightSection << Test::XdgShellSurfaceType::XdgShellV5;
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;
......@@ -238,9 +235,6 @@ void DecorationInputTest::testDoubleClick_data()
QTest::addColumn<Qt::WindowFrameSection>("expectedSection");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("topLeft|xdgv5") << QPoint(0, 0) << Qt::TopLeftSection << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("top|xdgv5") << QPoint(250, 0) << Qt::TopSection << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("topRight|xdgv5") << QPoint(499, 0) << Qt::TopRightSection << Test::XdgShellSurfaceType::XdgShellV5;
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;
......@@ -296,9 +290,6 @@ void DecorationInputTest::testDoubleTap_data()
QTest::addColumn<Qt::WindowFrameSection>("expectedSection");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("topLeft|xdgv5") << QPoint(10, 10) << Qt::TopLeftSection << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("top|xdgv5") << QPoint(260, 10) << Qt::TopSection << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("topRight|xdgv5") << QPoint(509, 10) << Qt::TopRightSection << Test::XdgShellSurfaceType::XdgShellV5;
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;
......@@ -354,7 +345,6 @@ void DecorationInputTest::testHover_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -414,10 +404,6 @@ void DecorationInputTest::testPressToMove_data()
QTest::addColumn<QPoint>("offset3");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("To right|xdgv5") << QPoint(10, 0) << QPoint(20, 0) << QPoint(30, 0) << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("To left|xdgv5") << QPoint(-10, 0) << QPoint(-20, 0) << QPoint(-30, 0) << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("To bottom|xdgv5") << QPoint(0, 10) << QPoint(0, 20) << QPoint(0, 30) << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("To top|xdgv5") << QPoint(0, -10) << QPoint(0, -20) << QPoint(0, -30) << Test::XdgShellSurfaceType::XdgShellV5;
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;
......@@ -483,10 +469,6 @@ void DecorationInputTest::testTapToMove_data()
QTest::addColumn<QPoint>("offset3");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("To right|xdgv5") << QPoint(10, 0) << QPoint(20, 0) << QPoint(30, 0) << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("To left|xdgv5") << QPoint(-10, 0) << QPoint(-20, 0) << QPoint(-30, 0) << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("To bottom|xdgv5") << QPoint(0, 10) << QPoint(0, 20) << QPoint(0, 30) << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("To top|xdgv5") << QPoint(0, -10) << QPoint(0, -20) << QPoint(0, -30) << Test::XdgShellSurfaceType::XdgShellV5;
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;
......@@ -552,13 +534,10 @@ void DecorationInputTest::testResizeOutsideWindow_data()
QTest::addColumn<Qt::Edge>("edge");
QTest::addColumn<Qt::CursorShape>("expectedCursor");
QTest::newRow("xdgShellV5 - left") << Test::XdgShellSurfaceType::XdgShellV5 << Qt::LeftEdge << Qt::SizeHorCursor;
QTest::newRow("xdgShellV6 - left") << Test::XdgShellSurfaceType::XdgShellV6 << Qt::LeftEdge << Qt::SizeHorCursor;
QTest::newRow("xdgWmBase - left") << Test::XdgShellSurfaceType::XdgShellStable << Qt::LeftEdge << Qt::SizeHorCursor;
QTest::newRow("xdgShellV5 - right") << Test::XdgShellSurfaceType::XdgShellV5 << Qt::RightEdge << 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("xdgShellV5 - bottom") << Test::XdgShellSurfaceType::XdgShellV5 << Qt::BottomEdge << Qt::SizeVerCursor;
QTest::newRow("xdgShellV6 - bottom") << Test::XdgShellSurfaceType::XdgShellV6 << Qt::BottomEdge << Qt::SizeVerCursor;
QTest::newRow("xdgWmBase - bottom") << Test::XdgShellSurfaceType::XdgShellStable << Qt::BottomEdge << Qt::SizeVerCursor;
}
......@@ -624,7 +603,6 @@ void DecorationInputTest::testModifierClickUnrestrictedMove_data()
const QString meta = QStringLiteral("Meta");
const QVector<std::pair<Test::XdgShellSurfaceType, QByteArray>> surfaceTypes{
{ Test::XdgShellSurfaceType::XdgShellV5, QByteArrayLiteral("XdgShellV5") },
{ Test::XdgShellSurfaceType::XdgShellV6, QByteArrayLiteral("XdgShellV6") },
{ Test::XdgShellSurfaceType::XdgShellStable, QByteArrayLiteral("XdgWmBase") },
};
......@@ -723,7 +701,6 @@ void DecorationInputTest::testModifierScrollOpacity_data()
const QString meta = QStringLiteral("Meta");
const QVector<std::pair<Test::XdgShellSurfaceType, QByteArray>> surfaceTypes{
{ Test::XdgShellSurfaceType::XdgShellV5, QByteArrayLiteral("XdgShellV5") },
{ Test::XdgShellSurfaceType::XdgShellV6, QByteArrayLiteral("XdgShellV6") },
{ Test::XdgShellSurfaceType::XdgShellStable, QByteArrayLiteral("XdgWmBase") },
};
......@@ -786,7 +763,6 @@ void DecorationInputTest::testTouchEvents_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -90,7 +90,6 @@ void DontCrashCursorPhysicalSizeEmpty::testMoveCursorOverDeco_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -101,7 +101,6 @@ void DontCrashNoBorder::testCreateWindow_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -117,7 +117,6 @@ void FadeTest::testWindowCloseAfterWindowHidden_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -99,7 +99,6 @@ void MaximizeAnimationTest::testMaximizeRestore_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -86,7 +86,6 @@ void TestIdleInhibition::testInhibit_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -104,7 +104,6 @@ void InputStackingOrderTest::testPointerFocusUpdatesOnStackingOrderChange_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -134,7 +134,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 {
XdgShellV5,
XdgShellV6,
XdgShellStable
};
......@@ -149,9 +148,6 @@ KWayland::Client::XdgShellSurface *createXdgShellSurface(XdgShellSurfaceType typ
QObject *parent = nullptr,
CreationSetup creationSetup = CreationSetup::CreateAndConfigure);
KWayland::Client::XdgShellSurface *createXdgShellV5Surface(KWayland::Client::Surface *surface,
QObject *parent = nullptr,
CreationSetup = CreationSetup::CreateAndConfigure);
KWayland::Client::XdgShellSurface *createXdgShellV6Surface(KWayland::Client::Surface *surface,
QObject *parent = nullptr,
CreationSetup = CreationSetup::CreateAndConfigure);
......
......@@ -555,7 +555,6 @@ void MoveResizeWindowTest::testClientSideMove_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -253,7 +253,6 @@ void PlasmaSurfaceTest::testOSDPlacementManualPosition_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgv5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgv6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -291,16 +290,12 @@ void PlasmaSurfaceTest::testPanelTypeHasStrut_data()
QTest::addColumn<QRect>("expectedMaxArea");
QTest::addColumn<KWin::Layer>("expectedLayer");
QTest::newRow("always visible - xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::AlwaysVisible << true << QRect(0, 50, 1280, 974) << KWin::DockLayer;
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 - xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::AutoHide << false << QRect(0, 0, 1280, 1024) << KWin::AboveLayer;
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 - xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::WindowsCanCover << false << QRect(0, 0, 1280, 1024) << KWin::NormalLayer;
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 - xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::WindowsGoBelow << false << QRect(0, 0, 1280, 1024) << KWin::DockLayer;
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;
}
......
......@@ -119,10 +119,6 @@ void TestPointerConstraints::testConfinedPointer_data()
PointerFunc topRight = &QRect::topRight;
PointerFunc topLeft = &QRect::topLeft;
QTest::newRow("XdgShellV5 - bottomLeft") << Test::XdgShellSurfaceType::XdgShellV5 << bottomLeft << -1 << 1;
QTest::newRow("XdgShellV5 - bottomRight") << Test::XdgShellSurfaceType::XdgShellV5 << bottomRight << 1 << 1;
QTest::newRow("XdgShellV5 - topLeft") << Test::XdgShellSurfaceType::XdgShellV5 << topLeft << -1 << -1;
QTest::newRow("XdgShellV5 - topRight") << Test::XdgShellSurfaceType::XdgShellV5 << topRight << 1 << -1;
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;
......@@ -296,7 +292,6 @@ void TestPointerConstraints::testLockedPointer_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -374,7 +369,6 @@ void TestPointerConstraints::testCloseWindowWithLockedPointer_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("XdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("XdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("XdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -154,7 +154,6 @@ void SceneQPainterTest::testWindow_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -258,7 +257,6 @@ void SceneQPainterTest::testCompositorRestart_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -266,7 +266,6 @@ void TestShellClientRules::cleanup()
void TestShellClientRules::name##_data() \
{ \
QTest::addColumn<Test::XdgShellSurfaceType>("type"); \
QTest::newRow("XdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5; \
QTest::newRow("XdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; \
QTest::newRow("XdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; \
}
......
......@@ -156,7 +156,6 @@ void TestShellClient::testMapUnmapMap_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -333,7 +332,6 @@ void TestShellClient::testWindowOutputs_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -380,7 +378,6 @@ void TestShellClient::testMinimizeActiveWindow_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -422,11 +419,9 @@ void TestShellClient::testFullscreen_data()
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::addColumn<ServerSideDecoration::Mode>("decoMode");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5 << ServerSideDecoration::Mode::Client;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Client;
QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Client;
QTest::newRow("xdgShellV5 - deco") << Test::XdgShellSurfaceType::XdgShellV5 << ServerSideDecoration::Mode::Server;
QTest::newRow("xdgShellV6 - deco") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Server;
QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server;
}
......@@ -501,7 +496,6 @@ void TestShellClient::testFullscreenRestore_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -563,7 +557,6 @@ void TestShellClient::testUserCanSetFullscreen_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -584,7 +577,6 @@ void TestShellClient::testUserSetFullscreen_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -648,11 +640,9 @@ void TestShellClient::testMaximizedToFullscreen_data()
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::addColumn<ServerSideDecoration::Mode>("decoMode");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5 << ServerSideDecoration::Mode::Client;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Client;
QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Client;
QTest::newRow("xdgShellV5 - deco") << Test::XdgShellSurfaceType::XdgShellV5 << ServerSideDecoration::Mode::Server;
QTest::newRow("xdgShellV6 - deco") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Server;
QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server;
}
......@@ -742,7 +732,6 @@ void TestShellClient::testWindowOpensLargerThanScreen_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -779,7 +768,6 @@ void TestShellClient::testHidden_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -917,11 +905,6 @@ void TestShellClient::testUnresponsiveWindow_data()
QTest::addColumn<QString>("shellInterface");//see env selection in qwaylandintegration.cpp
QTest::addColumn<bool>("socketMode");
//wl-shell ping is not implemented
//QTest::newRow("wl-shell display") << "wl-shell" << false;
//QTest::newRow("wl-shell socket") << "wl-shell" << true;
QTest::newRow("xdgv5 display") << "xdg-shell-v5" << false;
QTest::newRow("xdgv5 socket") << "xdg-shell-v5" << true;
QTest::newRow("xdgv6 display") << "xdg-shell-v6" << false;
QTest::newRow("xdgv6 socket") << "xdg-shell-v6" << true;
......@@ -1007,7 +990,6 @@ void TestShellClient::testX11WindowId_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -1075,7 +1057,6 @@ void TestShellClient::testSendClientWithTransientToDesktop_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -1131,7 +1112,6 @@ void TestShellClient::testMinimizeWindowWithTransients_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
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 *xdgShellV5 = nullptr;
XdgShell *xdgShellV6 = nullptr;
XdgShell *xdgShellStable = nullptr;
ShmPool *shm = nullptr;
......@@ -155,10 +154,6 @@ bool setupWaylandConnection(AdditionalWaylandInterfaces flags)
if (!s_waylandConnection.shm->isValid()) {
return false;
}
s_waylandConnection.xdgShellV5 = registry->createXdgShell(registry->interface(Registry::Interface::XdgShellUnstableV5).name, registry->interface(Registry::Interface::XdgShellUnstableV5).version);
if (!s_waylandConnection.xdgShellV5->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;
......@@ -249,8 +244,6 @@ void destroyWaylandConnection()
s_waylandConnection.seat = nullptr;
delete s_waylandConnection.pointerConstraints;
s_waylandConnection.pointerConstraints = nullptr;
delete s_waylandConnection.xdgShellV5;
s_waylandConnection.xdgShellV5 = nullptr;
delete s_waylandConnection.xdgShellV6;
s_waylandConnection.xdgShellV6 = nullptr;
delete s_waylandConnection.xdgShellStable;
......@@ -458,22 +451,6 @@ SubSurface *createSubSurface(Surface *surface, Surface *parentSurface, QObject *
return s;
}
XdgShellSurface *createXdgShellV5Surface(Surface *surface, QObject *parent, CreationSetup creationSetup)
{
if (!s_waylandConnection.xdgShellV5) {
return nullptr;
}
auto s = s_waylandConnection.xdgShellV5->createSurface(surface, parent);
if (!s->isValid()) {
delete s;
return nullptr;
}
if (creationSetup == CreationSetup::CreateAndConfigure) {
initXdgShellSurface(surface, s);
}
return s;
}
XdgShellSurface *createXdgShellV6Surface(Surface *surface, QObject *parent, CreationSetup creationSetup)
{
if (!s_waylandConnection.xdgShellV6) {
......@@ -545,8 +522,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::XdgShellV5:
return createXdgShellV5Surface(surface, parent, creationSetup);
case XdgShellSurfaceType::XdgShellV6:
return createXdgShellV6Surface(surface, parent, creationSetup);
case XdgShellSurfaceType::XdgShellStable:
......
......@@ -134,7 +134,6 @@ void VirtualDesktopTest::testLastDesktopRemoved_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -179,7 +178,6 @@ void VirtualDesktopTest::testWindowOnMultipleDesktops_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......@@ -268,7 +266,6 @@ void VirtualDesktopTest::testRemoveDesktopWithWindow_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
......
......@@ -312,12 +312,6 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags)
}
);
m_xdgShell5 = m_display->createXdgShell(XdgShellInterfaceVersion::UnstableV5, m_display);
m_xdgShell5->create();
connect(m_xdgShell5, &XdgShellInterface::surfaceCreated, this, &WaylandServer::createSurface<XdgShellSurfaceInterface>);
// TODO: verify seat and serial
connect(m_xdgShell5, &XdgShellInterface::popupCreated, this, &WaylandServer::createSurface<XdgShellPopupInterface>);
m_xdgShell6 = m_display->createXdgShell(XdgShellInterfaceVersion::UnstableV6, m_display);
m_xdgShell6->create();
connect(m_xdgShell6, &XdgShellInterface::surfaceCreated, this, &WaylandServer::createSurface<XdgShellSurfaceInterface>);
......
......@@ -234,7 +234,6 @@ private:
KWayland::Server::CompositorInterface *m_compositor = nullptr;
KWayland::Server::SeatInterface *m_seat = nullptr;
KWayland::Server::DataDeviceManagerInterface *m_dataDeviceManager = nullptr;
KWayland::Server::XdgShellInterface *m_xdgShell5 = nullptr;
KWayland::Server::XdgShellInterface *m_xdgShell6 = nullptr;
KWayland::Server::XdgShellInterface *m_xdgShell = nullptr;
KWayland::Server::PlasmaShellInterface *m_plasmaShell = 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