Commit 3a9d7a6e authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Port KWin to KWaylandServer

Summary: Away from KWayland::Server and KF5WaylandServer.

Test Plan: Builds, ran nested session

Reviewers: #kwin, #plasma, #frameworks, davidedmundson, zzag

Reviewed By: #kwin, #plasma, davidedmundson, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29278
parent 137a6a17
......@@ -125,6 +125,12 @@ set_package_properties(KScreenLocker PROPERTIES
PURPOSE "For screenlocker integration in kwin_wayland"
)
find_package(KWaylandServer CONFIG REQUIRED)
set_package_properties(KWaylandServer PROPERTIES
TYPE REQUIRED
PURPOSE "For Wayland integration"
)
find_package(Breeze 5.9.0 CONFIG)
set_package_properties(Breeze PROPERTIES
TYPE OPTIONAL
......@@ -637,7 +643,7 @@ set(kwin_XCB_LIBS
set(kwin_WAYLAND_LIBS
KF5::WaylandClient
KF5::WaylandServer
Plasma::KWaylandServer
Wayland::Cursor
XKB::XKB
${CMAKE_THREAD_LIBS_INIT}
......
......@@ -37,7 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "workspace.h"
#include "wayland_server.h"
#include <KWayland/Server/plasmawindowmanagement_interface.h>
#include <KWaylandServer/plasmawindowmanagement_interface.h>
#include <KDecoration2/Decoration>
......@@ -1348,7 +1348,7 @@ void AbstractClient::setupWindowManagementInterface()
if (!waylandServer()->windowManagement()) {
return;
}
using namespace KWayland::Server;
using namespace KWaylandServer;
auto w = waylandServer()->windowManagement()->createWindow(waylandServer()->windowManagement());
w->setTitle(caption());
w->setVirtualDesktop(isOnAllDesktops() ? 0 : desktop() - 1);
......
......@@ -31,13 +31,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QElapsedTimer>
#include <QPointer>
namespace KWayland
{
namespace Server
namespace KWaylandServer
{
class PlasmaWindowInterface;
}
}
namespace KDecoration2
{
......@@ -867,7 +864,7 @@ public:
/**
* Return window management interface
*/
KWayland::Server::PlasmaWindowInterface *windowManagementInterface() const {
KWaylandServer::PlasmaWindowInterface *windowManagementInterface() const {
return m_windowManagementInterface;
}
......@@ -1231,7 +1228,7 @@ private:
static QHash<QString, std::weak_ptr<Decoration::DecorationPalette>> s_palettes;
static std::shared_ptr<Decoration::DecorationPalette> s_defaultPalette;
KWayland::Server::PlasmaWindowInterface *m_windowManagementInterface = nullptr;
KWaylandServer::PlasmaWindowInterface *m_windowManagementInterface = nullptr;
AbstractClient *m_transientFor = nullptr;
QList<AbstractClient*> m_transients;
......
......@@ -83,7 +83,7 @@ void AbstractOutput::setEnabled(bool enable)
Q_UNUSED(enable)
}
void AbstractOutput::applyChanges(const KWayland::Server::OutputChangeSet *changeSet)
void AbstractOutput::applyChanges(const KWaylandServer::OutputChangeSet *changeSet)
{
Q_UNUSED(changeSet)
}
......
......@@ -27,13 +27,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QSize>
#include <QVector>
namespace KWayland
{
namespace Server
namespace KWaylandServer
{
class OutputChangeSet;
}
}
namespace KWin
{
......@@ -127,7 +124,7 @@ public:
*
* Default implementation does nothing
*/
virtual void applyChanges(const KWayland::Server::OutputChangeSet *changeSet);
virtual void applyChanges(const KWaylandServer::OutputChangeSet *changeSet);
/**
* Returns geometry of this output in device independent pixels.
......
......@@ -24,9 +24,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "wayland_server.h"
// KWayland
#include <KWayland/Server/display.h>
#include <KWayland/Server/outputchangeset.h>
#include <KWayland/Server/xdgoutput_interface.h>
#include <KWaylandServer/display.h>
#include <KWaylandServer/outputchangeset.h>
#include <KWaylandServer/xdgoutput_interface.h>
// KF5
#include <KLocalizedString>
......@@ -42,8 +42,8 @@ AbstractWaylandOutput::AbstractWaylandOutput(QObject *parent)
m_waylandOutputDevice = waylandServer()->display()->createOutputDevice(this);
m_xdgOutput = waylandServer()->xdgOutputManager()->createXdgOutput(m_waylandOutput, this);
connect(m_waylandOutput, &KWayland::Server::OutputInterface::dpmsModeRequested, this,
[this] (KWayland::Server::OutputInterface::DpmsMode mode) {
connect(m_waylandOutput, &KWaylandServer::OutputInterface::dpmsModeRequested, this,
[this] (KWaylandServer::OutputInterface::DpmsMode mode) {
updateDpms(mode);
});
}
......@@ -121,12 +121,12 @@ void AbstractWaylandOutput::setScale(qreal scale)
m_xdgOutput->done();
}
using DeviceInterface = KWayland::Server::OutputDeviceInterface;
using DeviceInterface = KWaylandServer::OutputDeviceInterface;
KWayland::Server::OutputInterface::Transform toOutputTransform(DeviceInterface::Transform transform)
KWaylandServer::OutputInterface::Transform toOutputTransform(DeviceInterface::Transform transform)
{
using Transform = DeviceInterface::Transform;
using OutputTransform = KWayland::Server::OutputInterface::Transform;
using OutputTransform = KWaylandServer::OutputInterface::Transform;
switch (transform) {
case Transform::Rotated90:
......@@ -169,7 +169,7 @@ DeviceInterface::Transform toDeviceTransform(AbstractWaylandOutput::Transform tr
return static_cast<DeviceInterface::Transform>(transform);
}
void AbstractWaylandOutput::applyChanges(const KWayland::Server::OutputChangeSet *changeSet)
void AbstractWaylandOutput::applyChanges(const KWaylandServer::OutputChangeSet *changeSet)
{
qCDebug(KWIN_CORE) << "Apply changes to the Wayland output.";
bool emitModeChanged = false;
......@@ -270,12 +270,12 @@ void AbstractWaylandOutput::initInterfaces(const QString &model, const QString &
qCDebug(KWIN_CORE).nospace() << "Adding mode " << ++i << ": " << mode.size << " [" << mode.refreshRate << "]";
m_waylandOutputDevice->addMode(mode);
KWayland::Server::OutputInterface::ModeFlags flags;
KWaylandServer::OutputInterface::ModeFlags flags;
if (mode.flags & DeviceInterface::ModeFlag::Current) {
flags |= KWayland::Server::OutputInterface::ModeFlag::Current;
flags |= KWaylandServer::OutputInterface::ModeFlag::Current;
}
if (mode.flags & DeviceInterface::ModeFlag::Preferred) {
flags |= KWayland::Server::OutputInterface::ModeFlag::Preferred;
flags |= KWaylandServer::OutputInterface::ModeFlag::Preferred;
}
m_waylandOutput->addMode(mode.size, flags, mode.refreshRate);
}
......
......@@ -31,12 +31,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QSize>
#include <QVector>
#include <KWayland/Server/output_interface.h>
#include <KWayland/Server/outputdevice_interface.h>
#include <KWaylandServer/output_interface.h>
#include <KWaylandServer/outputdevice_interface.h>
namespace KWayland
{
namespace Server
namespace KWaylandServer
{
class OutputInterface;
class OutputDeviceInterface;
......@@ -44,7 +42,6 @@ class OutputChangeSet;
class OutputManagementInterface;
class XdgOutputInterface;
}
}
namespace KWin
{
......@@ -109,9 +106,9 @@ public:
void setGlobalPos(const QPoint &pos);
void setScale(qreal scale);
void applyChanges(const KWayland::Server::OutputChangeSet *changeSet) override;
void applyChanges(const KWaylandServer::OutputChangeSet *changeSet) override;
QPointer<KWayland::Server::OutputInterface> waylandOutput() const {
QPointer<KWaylandServer::OutputInterface> waylandOutput() const {
return m_waylandOutput;
}
......@@ -132,7 +129,7 @@ Q_SIGNALS:
protected:
void initInterfaces(const QString &model, const QString &manufacturer,
const QByteArray &uuid, const QSize &physicalSize,
const QVector<KWayland::Server::OutputDeviceInterface::Mode> &modes);
const QVector<KWaylandServer::OutputDeviceInterface::Mode> &modes);
QPoint globalPos() const;
......@@ -152,7 +149,7 @@ protected:
virtual void updateEnablement(bool enable) {
Q_UNUSED(enable);
}
virtual void updateDpms(KWayland::Server::OutputInterface::DpmsMode mode) {
virtual void updateDpms(KWaylandServer::OutputInterface::DpmsMode mode) {
Q_UNUSED(mode);
}
virtual void updateMode(int modeIndex) {
......@@ -168,12 +165,12 @@ protected:
QSize orientateSize(const QSize &size) const;
private:
void setTransform(KWayland::Server::OutputDeviceInterface::Transform transform);
void setTransform(KWaylandServer::OutputDeviceInterface::Transform transform);
KWayland::Server::OutputInterface *m_waylandOutput;
KWayland::Server::XdgOutputInterface *m_xdgOutput;
KWayland::Server::OutputDeviceInterface *m_waylandOutputDevice;
KWayland::Server::OutputInterface::DpmsMode m_dpms = KWayland::Server::OutputInterface::DpmsMode::On;
KWaylandServer::OutputInterface *m_waylandOutput;
KWaylandServer::XdgOutputInterface *m_xdgOutput;
KWaylandServer::OutputDeviceInterface *m_waylandOutputDevice;
KWaylandServer::OutputInterface::DpmsMode m_dpms = KWaylandServer::OutputInterface::DpmsMode::On;
QString m_name;
bool m_internal = false;
......
......@@ -43,7 +43,7 @@ target_link_libraries(testVirtualDesktops
KF5::ConfigCore
KF5::GlobalAccel
KF5::I18n
KF5::WaylandServer
Plasma::KWaylandServer
KF5::WindowSystem
)
add_test(NAME kwin-testVirtualDesktops COMMAND testVirtualDesktops)
......@@ -311,7 +311,7 @@ target_link_libraries(testScreenEdges
KF5::GlobalAccel
KF5::I18n
KF5::Notifications
KF5::WaylandServer
Plasma::KWaylandServer
KF5::WindowSystem
XCB::COMPOSITE
......@@ -402,7 +402,7 @@ target_link_libraries(testXkb
Qt5::Widgets
KF5::ConfigCore
KF5::WaylandServer
Plasma::KWaylandServer
KF5::WindowSystem
XKB::XKB
......
......@@ -33,8 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/seat.h>
#include <KWayland/Client/server_decoration.h>
#include <KWayland/Client/surface.h>
#include <KWayland/Server/display.h>
#include <KWayland/Server/output_interface.h>
#include <KWaylandServer/display.h>
#include <KWaylandServer/output_interface.h>
using namespace KWin;
using namespace KWayland::Client;
......@@ -106,7 +106,7 @@ void DontCrashCursorPhysicalSizeEmpty::testMoveCursorOverDeco()
QVERIFY(c->isDecorated());
// destroy physical size
KWayland::Server::Display *display = waylandServer()->display();
KWaylandServer::Display *display = waylandServer()->display();
auto output = display->outputs().first();
output->setPhysicalSize(QSize(0, 0));
// and fake a cursor theme change, so that the theme gets recreated
......
......@@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "workspace.h"
#include <KWayland/Client/surface.h>
#include <KWayland/Server/seat_interface.h>
#include <KWaylandServer/seat_interface.h>
#include <KGlobalAccel>
#include <linux/input.h>
......
......@@ -27,12 +27,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/surface.h>
#include <KWayland/Client/xdgshell.h>
#include <KWayland/Server/display.h>
#include <KWayland/Server/idle_interface.h>
#include <KWaylandServer/display.h>
#include <KWaylandServer/idle_interface.h>
using namespace KWin;
using namespace KWayland::Client;
using KWayland::Server::IdleInterface;
using KWaylandServer::IdleInterface;
static const QString s_socketName = QStringLiteral("wayland_test_kwin_idle_inhbition_test-0");
......
......@@ -37,7 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/shm_pool.h>
#include <KWayland/Client/surface.h>
#include <KWayland/Server/seat_interface.h>
#include <KWaylandServer/seat_interface.h>
namespace KWin
{
......
......@@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/seat.h>
#include <KWindowSystem>
#include <KWayland/Server/surface_interface.h>
#include <KWaylandServer/surface_interface.h>
#include <linux/input.h>
......
......@@ -38,7 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/shm_pool.h>
#include <KWayland/Client/surface.h>
#include <KWayland/Client/touch.h>
#include <KWayland/Server/seat_interface.h>
#include <KWaylandServer/seat_interface.h>
//screenlocker
#include <KScreenLocker/KsldApp>
......
......@@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/xdgdecoration.h>
#include <KWayland/Client/plasmashell.h>
#include <KWayland/Server/xdgdecoration_interface.h>
#include <KWaylandServer/xdgdecoration_interface.h>
#include <KDecoration2/DecoratedClient>
#include <KDecoration2/Decoration>
......
......@@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/compositor.h>
#include <KWayland/Client/plasmawindowmanagement.h>
#include <KWayland/Client/surface.h>
#include <KWayland/Server/seat_interface.h>
#include <KWaylandServer/seat_interface.h>
//screenlocker
#include <KScreenLocker/KsldApp>
......
......@@ -35,8 +35,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/seat.h>
#include <KWayland/Client/shm_pool.h>
#include <KWayland/Client/surface.h>
#include <KWayland/Server/seat_interface.h>
#include <KWayland/Server/surface_interface.h>
#include <KWaylandServer/seat_interface.h>
#include <KWaylandServer/surface_interface.h>
#include <linux/input.h>
......@@ -262,7 +262,7 @@ void TestPointerConstraints::testConfinedPointer()
confinedPointer.reset(nullptr);
Test::flushWaylandConnection();
QSignalSpy constraintsChangedSpy(input()->pointer()->focus()->surface(), &KWayland::Server::SurfaceInterface::pointerConstraintsChanged);
QSignalSpy constraintsChangedSpy(input()->pointer()->focus()->surface(), &KWaylandServer::SurfaceInterface::pointerConstraintsChanged);
QVERIFY(constraintsChangedSpy.isValid());
QVERIFY(constraintsChangedSpy.wait());
......@@ -349,7 +349,7 @@ void TestPointerConstraints::testLockedPointer()
lockedPointer.reset(nullptr);
Test::flushWaylandConnection();
QSignalSpy constraintsChangedSpy(input()->pointer()->focus()->surface(), &KWayland::Server::SurfaceInterface::pointerConstraintsChanged);
QSignalSpy constraintsChangedSpy(input()->pointer()->focus()->surface(), &KWaylandServer::SurfaceInterface::pointerConstraintsChanged);
QVERIFY(constraintsChangedSpy.isValid());
QVERIFY(constraintsChangedSpy.wait());
......
......@@ -41,9 +41,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/shm_pool.h>
#include <KWayland/Client/surface.h>
#include <KWayland/Server/buffer_interface.h>
#include <KWayland/Server/clientconnection.h>
#include <KWayland/Server/seat_interface.h>
#include <KWaylandServer/buffer_interface.h>
#include <KWaylandServer/clientconnection.h>
#include <KWaylandServer/seat_interface.h>
#include <wayland-cursor.h>
......@@ -75,7 +75,7 @@ PlatformCursorImage loadReferenceThemeCursor(const T &shape)
waylandServer()->internalClientConection()->flush();
waylandServer()->dispatch();
auto buffer = KWayland::Server::BufferInterface::get(
auto buffer = KWaylandServer::BufferInterface::get(
waylandServer()->internalConnection()->getResource(
KWayland::Client::Buffer::getId(b)));
if (!buffer) {
......
......@@ -33,8 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/shadow.h>
#include <KWayland/Client/shm_pool.h>
#include <KWayland/Client/surface.h>
#include <KWayland/Server/shadow_interface.h>
#include <KWayland/Server/surface_interface.h>
#include <KWaylandServer/shadow_interface.h>
#include <KWaylandServer/surface_interface.h>
#include "kwin_wayland_test.h"
......@@ -728,14 +728,14 @@ void SceneOpenGLShadowTest::testNoCornerShadowTiles()
clientShadow->setOffsets(QMarginsF(128, 128, 128, 128));
QSignalSpy shadowChangedSpy(client->surface(), &KWayland::Server::SurfaceInterface::shadowChanged);
QSignalSpy shadowChangedSpy(client->surface(), &KWaylandServer::SurfaceInterface::shadowChanged);
QVERIFY(shadowChangedSpy.isValid());
clientShadow->commit();
surface->commit(Surface::CommitFlag::None);
QVERIFY(shadowChangedSpy.wait());
// Check that we got right shadow from the client.
QPointer<KWayland::Server::ShadowInterface> shadowIface = client->surface()->shadow();
QPointer<KWaylandServer::ShadowInterface> shadowIface = client->surface()->shadow();
QVERIFY(!shadowIface.isNull());
QCOMPARE(shadowIface->offset().left(), 128.0);
QCOMPARE(shadowIface->offset().top(), 128.0);
......@@ -808,14 +808,14 @@ void SceneOpenGLShadowTest::testDistributeHugeCornerTiles()
clientShadow->setOffsets(QMarginsF(256, 256, 256, 0));
QSignalSpy shadowChangedSpy(client->surface(), &KWayland::Server::SurfaceInterface::shadowChanged);
QSignalSpy shadowChangedSpy(client->surface(), &KWaylandServer::SurfaceInterface::shadowChanged);
QVERIFY(shadowChangedSpy.isValid());
clientShadow->commit();
surface->commit(Surface::CommitFlag::None);
QVERIFY(shadowChangedSpy.wait());
// Check that we got right shadow from the client.
QPointer<KWayland::Server::ShadowInterface> shadowIface = client->surface()->shadow();
QPointer<KWaylandServer::ShadowInterface> shadowIface = client->surface()->shadow();
QVERIFY(!shadowIface.isNull());
QCOMPARE(shadowIface->offset().left(), 256.0);
QCOMPARE(shadowIface->offset().top(), 256.0);
......
......@@ -37,8 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/shadow.h>
#include <KWayland/Client/shm_pool.h>
#include <KWayland/Client/surface.h>
#include <KWayland/Server/shadow_interface.h>
#include <KWayland/Server/surface_interface.h>
#include <KWaylandServer/shadow_interface.h>
#include <KWaylandServer/surface_interface.h>
#include "kwin_wayland_test.h"
......@@ -753,7 +753,7 @@ void SceneQPainterShadowTest::testShadowTextureReconstruction()
clientShadow->setOffsets(QMarginsF(128, 128, 128, 128));
// Commit shadow.
QSignalSpy shadowChangedSpy(client->surface(), &KWayland::Server::SurfaceInterface::shadowChanged);
QSignalSpy shadowChangedSpy(client->surface(), &KWaylandServer::SurfaceInterface::shadowChanged);
QVERIFY(shadowChangedSpy.isValid());
clientShadow->commit();
surface->commit(Surface::CommitFlag::None);
......
......@@ -33,8 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/seat.h>
#include <KWayland/Client/surface.h>
#include <KWayland/Client/pointer.h>
#include <KWayland/Server/buffer_interface.h>
#include <KWayland/Server/surface_interface.h>
#include <KWaylandServer/buffer_interface.h>
#include <KWaylandServer/surface_interface.h>
#include <QPainter>
......
......@@ -41,7 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/appmenu.h>
#include <KWayland/Client/xdgshell.h>
#include <KWayland/Client/xdgdecoration.h>
#include <KWayland/Server/display.h>
#include <KWaylandServer/display.h>
//screenlocker
#include <KScreenLocker/KsldApp>
......
......@@ -40,8 +40,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/surface.h>
#include <KWayland/Client/touch.h>
#include <KWayland/Client/xdgshell.h>
#include <KWayland/Server/seat_interface.h>
#include <KWayland/Server/surface_interface.h>
#include <KWaylandServer/seat_interface.h>
#include <KWaylandServer/surface_interface.h>
namespace KWin
{
......
......@@ -44,9 +44,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/xdgdecoration.h>
#include <KWayland/Client/appmenu.h>
#include <KWayland/Server/clientconnection.h>
#include <KWayland/Server/display.h>
#include <KWayland/Server/xdgdecoration_interface.h>
#include <KWaylandServer/clientconnection.h>
#include <KWaylandServer/display.h>
#include <KWaylandServer/xdgdecoration_interface.h>
#include <QDBusConnection>
......
......@@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "wayland_server.h"
#include "workspace.h"
#include <KWayland/Server/seat_interface.h>
#include <KWaylandServer/seat_interface.h>
#include <QSocketNotifier>
......
......@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "workspace.h"
#include "../../xwl/databridge.h"
#include <KWayland/Server/datadevice_interface.h>
#include <KWaylandServer/datadevice_interface.h>
#include <QProcess>
#include <QProcessEnvironment>
......@@ -114,7 +114,7 @@ void XwaylandSelectionsTest::testSync()
QVERIFY(clientAddedSpy.isValid());
QSignalSpy shellClientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded);
QVERIFY(shellClientAddedSpy.isValid());
QSignalSpy clipboardChangedSpy(Xwl::DataBridge::self()->dataDeviceIface(), &KWayland::Server::DataDeviceInterface::selectionChanged);
QSignalSpy clipboardChangedSpy(Xwl::DataBridge::self()->dataDeviceIface(), &KWaylandServer::DataDeviceInterface::selectionChanged);
QVERIFY(clipboardChangedSpy.isValid());
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
......
......@@ -131,7 +131,7 @@ public:
KWin::EffectWindow *findWindow(WId) const override {
return nullptr;
}
KWin::EffectWindow *findWindow(KWayland::Server::SurfaceInterface *) const override {
KWin::EffectWindow *findWindow(KWaylandServer::SurfaceInterface *) const override {
return nullptr;
}
KWin::EffectWindow *findWindow(QWindow *w) const override {
......@@ -240,7 +240,7 @@ public:
xcb_window_t x11RootWindow() const override {
return QX11Info::appRootWindow();
}
KWayland::Server::Display *waylandDisplay() const override {
KWaylandServer::Display *waylandDisplay() const override {
return nullptr;
}
......
......@@ -236,7 +236,7 @@ public:
bool skipsCloseAnimation() const override {
return false;
}
KWayland::Server::SurfaceInterface *surface() const override {
KWaylandServer::SurfaceInterface *surface() const override {
return nullptr;
}
bool isFullScreen() const override {
......
......@@ -39,7 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kwingltexture.h>
#include <KWayland/Server/surface_interface.h>
#include <KWaylandServer/surface_interface.h>
#include <KGlobalAccel>
#include <KLocalizedString>
......
......@@ -37,10 +37,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "ui_debug_console.h"
// KWayland
#include <KWayland/Server/buffer_interface.h>
#include <KWayland/Server/clientconnection.h>
#include <KWayland/Server/subcompositor_interface.h>
#include <KWayland/Server/surface_interface.h>
#include <KWaylandServer/buffer_interface.h>
#include <KWaylandServer/clientconnection.h>
#include <KWaylandServer/subcompositor_interface.h>
#include <KWaylandServer/surface_interface.h>
// frameworks
#include <KLocalizedString>
#include <NETWM>
......@@ -732,9 +732,9 @@ QString DebugConsoleDelegate::displayText(const QVariant &value, const QLocale &
return QStringLiteral("%1,%2 %3x%4").arg(r.x()).arg(r.y()).arg(r.width()).arg(r.height());
}
default:
if (value.userType() == qMetaTypeId<KWayland::Server::SurfaceInterface*>()) {
if (auto s = value.value<KWayland::Server::SurfaceInterface*>()) {
return QStringLiteral("KWayland::Server::SurfaceInterface(0x%1)").arg(qulonglong(s), 0, 16);
if (value.userType() == qMetaTypeId<KWaylandServer::SurfaceInterface*>()) {
if (auto s = value.value<KWaylandServer::SurfaceInterface*>()) {
return QStringLiteral("KWaylandServer::SurfaceInterface(0x%1)").arg(qulonglong(s), 0, 16);
} else {
return QStringLiteral("nullptr");
}
......@@ -1272,7 +1272,7 @@ SurfaceTreeModel::SurfaceTreeModel(QObject *parent)
beginResetModel();
endResetModel();
};
using namespace KWayland::Server;
using namespace KWaylandServer;
const auto unmangeds = workspace()->unmanagedList();
for (auto u : unmangeds) {
......@@ -1332,7 +1332,7 @@ int SurfaceTreeModel::columnCount(const QModelIndex &parent) const
int SurfaceTreeModel::rowCount(const QModelIndex &parent) const
{
if (parent.isValid()) {
using namespace KWayland::Server;
using namespace KWaylandServer;
if (SurfaceInterface *surface = static_cast<SurfaceInterface*>(parent.internalPointer())) {
const auto &children = surface->childSubSurfaces();
return children.count();
......@@ -1353,7 +1353,7 @@ QModelIndex SurfaceTreeModel::index(int row, int column, const QModelIndex &pare
}
if (parent.isValid()) {
using namespace KWayland::Server;
using namespace KWaylandServer;
if (SurfaceInterface *surface = static_cast<SurfaceInterface*>(parent.internalPointer())) {
const auto &children = surface->childSubSurfaces();
if (row < children.count()) {
......@@ -1385,7 +1385,7 @@ QModelIndex SurfaceTreeModel::index(int row, int column, const QModelIndex &pare