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/D29278master
parent
137a6a1705
commit
3a9d7a6e9d
|
@ -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
|
|||
|
||||
QModelIndex SurfaceTreeModel::parent(const QModelIndex &child) const
|
||||
{
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
if (SurfaceInterface *surface = static_cast<SurfaceInterface*>(child.internalPointer())) {
|
||||
const auto &subsurface = surface->subSurface();
|
||||
if (subsurface.isNull()) {
|
||||
|
@ -1444,7 +1444,7 @@ QVariant SurfaceTreeModel::data(const QModelIndex &index, int role) const
|
|||
if (!index.isValid()) {
|
||||
return QVariant();
|
||||
}
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
if (SurfaceInterface *surface = static_cast<SurfaceInterface*>(index.internalPointer())) {
|
||||
if (role == Qt::DisplayRole || role == Qt::ToolTipRole) {
|
||||
return QStringLiteral("%1 (%2) - %3").arg(surface->client()->executablePath())
|
||||
|
|
|
@ -36,7 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <KDecoration2/DecorationSettings>
|
||||
|
||||
// KWayland
|
||||
#include <KWayland/Server/server_decoration_interface.h>
|
||||
#include <KWaylandServer/server_decoration_interface.h>
|
||||
|
||||
// Frameworks
|
||||
#include <KPluginMetaData>
|
||||
|
@ -111,7 +111,7 @@ void DecorationBridge::readDecorationOptions()
|
|||
|
||||
void DecorationBridge::init()
|
||||
{
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
m_noPlugin = readNoPlugin();
|
||||
if (m_noPlugin) {
|
||||
if (waylandServer()) {
|
||||
|
|
|
@ -1095,7 +1095,7 @@ EffectWindow* EffectsHandlerImpl::findWindow(WId id) const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
EffectWindow* EffectsHandlerImpl::findWindow(KWayland::Server::SurfaceInterface *surf) const
|
||||
EffectWindow* EffectsHandlerImpl::findWindow(KWaylandServer::SurfaceInterface *surf) const
|
||||
{
|
||||
if (waylandServer()) {
|
||||
if (AbstractClient *w = waylandServer()->findClient(surf)) {
|
||||
|
@ -1546,7 +1546,7 @@ QStringList EffectsHandlerImpl::activeEffects() const
|
|||
return ret;
|
||||
}
|
||||
|
||||
KWayland::Server::Display *EffectsHandlerImpl::waylandDisplay() const
|
||||
KWaylandServer::Display *EffectsHandlerImpl::waylandDisplay() const
|
||||
{
|
||||
if (waylandServer()) {
|
||||
return waylandServer()->display();
|
||||
|
@ -1863,7 +1863,7 @@ TOPLEVEL_HELPER(bool, hasOwnShape, shape)
|
|||
TOPLEVEL_HELPER(QString, windowRole, windowRole)
|
||||
TOPLEVEL_HELPER(QStringList, activities, activities)
|
||||
TOPLEVEL_HELPER(bool, skipsCloseAnimation, skipsCloseAnimation)
|
||||
TOPLEVEL_HELPER(KWayland::Server::SurfaceInterface *, surface, surface)
|
||||
TOPLEVEL_HELPER(KWaylandServer::SurfaceInterface *, surface, surface)
|
||||
TOPLEVEL_HELPER(bool, isPopupWindow, isPopupWindow)
|
||||
TOPLEVEL_HELPER(bool, isOutline, isOutline)
|
||||
TOPLEVEL_HELPER(pid_t, pid, pid)
|
||||
|
|
11
effects.h
11
effects.h
|
@ -35,13 +35,10 @@ namespace Plasma {
|
|||
class Theme;
|
||||
}
|
||||
|
||||
namespace KWayland
|
||||
{
|
||||
namespace Server
|
||||
namespace KWaylandServer
|
||||
{
|
||||
class Display;
|
||||
}
|
||||
}
|
||||
|
||||
class QDBusPendingCallWatcher;
|
||||
class QDBusServiceWatcher;
|
||||
|
@ -134,7 +131,7 @@ public:
|
|||
void startMousePolling() override;
|
||||
void stopMousePolling() override;
|
||||
EffectWindow* findWindow(WId id) const override;
|
||||
EffectWindow* findWindow(KWayland::Server::SurfaceInterface *surf) const override;
|
||||
EffectWindow* findWindow(KWaylandServer::SurfaceInterface *surf) const override;
|
||||
EffectWindow *findWindow(QWindow *w) const override;
|
||||
EffectWindow *findWindow(const QUuid &id) const override;
|
||||
EffectWindowList stackingOrder() const override;
|
||||
|
@ -231,7 +228,7 @@ public:
|
|||
return m_currentRenderedDesktop;
|
||||
}
|
||||
|
||||
KWayland::Server::Display *waylandDisplay() const override;
|
||||
KWaylandServer::Display *waylandDisplay() const override;
|
||||
|
||||
bool animationsSupported() const override;
|
||||
|
||||
|
@ -453,7 +450,7 @@ public:
|
|||
bool isPopupWindow() const override;
|
||||
bool isOutline() const override;
|
||||
|
||||
KWayland::Server::SurfaceInterface *surface() const override;
|
||||
KWaylandServer::SurfaceInterface *surface() const override;
|
||||
bool isFullScreen() const override;
|
||||
bool isUnresponsive() const override;
|
||||
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
#include <QMatrix4x4>
|
||||
#include <QWindow>
|
||||
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWayland/Server/contrast_interface.h>
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
#include <KWaylandServer/contrast_interface.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ ContrastEffect::ContrastEffect()
|
|||
// Should be included in _NET_SUPPORTED instead.
|
||||
if (shader && shader->isValid()) {
|
||||
net_wm_contrast_region = effects->announceSupportProperty(s_contrastAtomName, this);
|
||||
KWayland::Server::Display *display = effects->waylandDisplay();
|
||||
KWaylandServer::Display *display = effects->waylandDisplay();
|
||||
if (display) {
|
||||
m_contrastManager = display->createContrastManager(this);
|
||||
m_contrastManager->create();
|
||||
|
@ -133,7 +133,7 @@ void ContrastEffect::updateContrastRegion(EffectWindow *w)
|
|||
}
|
||||
}
|
||||
|
||||
KWayland::Server::SurfaceInterface *surf = w->surface();
|
||||
KWaylandServer::SurfaceInterface *surf = w->surface();
|
||||
|
||||
if (surf && surf->contrast()) {
|
||||
region = surf->contrast()->region();
|
||||
|
@ -174,10 +174,10 @@ void ContrastEffect::updateContrastRegion(EffectWindow *w)
|
|||
|
||||
void ContrastEffect::slotWindowAdded(EffectWindow *w)
|
||||
{
|
||||
KWayland::Server::SurfaceInterface *surf = w->surface();
|
||||
KWaylandServer::SurfaceInterface *surf = w->surface();
|
||||
|
||||
if (surf) {
|
||||
m_contrastChangedConnections[w] = connect(surf, &KWayland::Server::SurfaceInterface::contrastChanged, this, [this, w] () {
|
||||
m_contrastChangedConnections[w] = connect(surf, &KWaylandServer::SurfaceInterface::contrastChanged, this, [this, w] () {
|
||||
|
||||
if (w) {
|
||||
updateContrastRegion(w);
|
||||
|
|
|
@ -28,13 +28,10 @@
|
|||
#include <QVector>
|
||||
#include <QVector2D>
|
||||
|
||||
namespace KWayland
|
||||
{
|
||||
namespace Server
|
||||
namespace KWaylandServer
|
||||
{
|
||||
class ContrastManagerInterface;
|
||||
}
|
||||
}
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -87,7 +84,7 @@ private:
|
|||
QRegion m_currentContrast; // keeps track of the currently contrasted area of non-caching windows(from bottom to top)
|
||||
QHash< const EffectWindow*, QMatrix4x4> m_colorMatrices;
|
||||
QHash< const EffectWindow*, QMetaObject::Connection > m_contrastChangedConnections; // used only in Wayland to keep track of effect changed
|
||||
KWayland::Server::ContrastManagerInterface *m_contrastManager = nullptr;
|
||||
KWaylandServer::ContrastManagerInterface *m_contrastManager = nullptr;
|
||||
};
|
||||
|
||||
inline
|
||||
|
|
|
@ -31,10 +31,10 @@
|
|||
#include <QWindow>
|
||||
#include <cmath> // for ceil()
|
||||
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWayland/Server/blur_interface.h>
|
||||
#include <KWayland/Server/shadow_interface.h>
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
#include <KWaylandServer/blur_interface.h>
|
||||
#include <KWaylandServer/shadow_interface.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
#include <KSharedConfig>
|
||||
#include <KConfigGroup>
|
||||
|
||||
|
@ -55,7 +55,7 @@ BlurEffect::BlurEffect()
|
|||
// Should be included in _NET_SUPPORTED instead.
|
||||
if (m_shader && m_shader->isValid() && m_renderTargetsValid) {
|
||||
net_wm_blur_region = effects->announceSupportProperty(s_blurAtomName, this);
|
||||
KWayland::Server::Display *display = effects->waylandDisplay();
|
||||
KWaylandServer::Display *display = effects->waylandDisplay();
|
||||
if (display) {
|
||||
m_blurManager = display->createBlurManager(this);
|
||||
m_blurManager->create();
|
||||
|
@ -291,7 +291,7 @@ void BlurEffect::updateBlurRegion(EffectWindow *w) const
|
|||
}
|
||||
}
|
||||
|
||||
KWayland::Server::SurfaceInterface *surf = w->surface();
|
||||
KWaylandServer::SurfaceInterface *surf = w->surface();
|
||||
|
||||
if (surf && surf->blur()) {
|
||||
region = surf->blur()->region();
|
||||
|
@ -317,10 +317,10 @@ void BlurEffect::updateBlurRegion(EffectWindow *w) const
|
|||
|
||||
void BlurEffect::slotWindowAdded(EffectWindow *w)
|
||||
{
|
||||
KWayland::Server::SurfaceInterface *surf = w->surface();
|
||||
KWaylandServer::SurfaceInterface *surf = w->surface();
|
||||
|
||||
if (surf) {
|
||||
windowBlurChangedConnections[w] = connect(surf, &KWayland::Server::SurfaceInterface::blurChanged, this, [this, w] () {
|
||||
windowBlurChangedConnections[w] = connect(surf, &KWaylandServer::SurfaceInterface::blurChanged, this, [this, w] () {
|
||||
if (w) {
|
||||
updateBlurRegion(w);
|
||||
}
|
||||
|
|
|
@ -29,13 +29,10 @@
|
|||
#include <QVector2D>
|
||||
#include <QStack>
|
||||
|
||||
namespace KWayland
|
||||
{
|
||||
namespace Server
|
||||
namespace KWaylandServer
|
||||
{
|
||||
class BlurManagerInterface;
|
||||
}
|
||||
}
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -131,7 +128,7 @@ private:
|
|||
QVector <BlurValuesStruct> blurStrengthValues;
|
||||
|
||||
QMap <EffectWindow*, QMetaObject::Connection> windowBlurChangedConnections;
|
||||
KWayland::Server::BlurManagerInterface *m_blurManager = nullptr;
|
||||
KWaylandServer::BlurManagerInterface *m_blurManager = nullptr;
|
||||
};
|
||||
|
||||
inline
|
||||
|
|
|
@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <QQuickItem>
|
||||
#include <QQmlContext>
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
|
|
@ -26,9 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <QFontMetrics>
|
||||
#include <QWindow>
|
||||
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWayland/Server/slide_interface.h>
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
#include <KWaylandServer/slide_interface.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
|
||||
#include <KWindowEffects>
|
||||
|
||||
|
@ -40,7 +40,7 @@ namespace KWin
|
|||
SlidingPopupsEffect::SlidingPopupsEffect()
|
||||
{
|
||||
initConfig<SlidingPopupsConfig>();
|
||||
KWayland::Server::Display *display = effects->waylandDisplay();
|
||||
KWaylandServer::Display *display = effects->waylandDisplay();
|
||||
if (display) {
|
||||
display->createSlideManager(this)->create();
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ void SlidingPopupsEffect::slotWindowAdded(EffectWindow *w)
|
|||
//Wayland
|
||||
if (auto surf = w->surface()) {
|
||||
slotWaylandSlideOnShowChanged(w);
|
||||
connect(surf, &KWayland::Server::SurfaceInterface::slideOnShowHideChanged, this, [this, surf] {
|
||||
connect(surf, &KWaylandServer::SurfaceInterface::slideOnShowHideChanged, this, [this, surf] {
|
||||
slotWaylandSlideOnShowChanged(effects->findWindow(surf));
|
||||
});
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ void SlidingPopupsEffect::slotWaylandSlideOnShowChanged(EffectWindow* w)
|
|||
return;
|
||||
}
|
||||
|
||||
KWayland::Server::SurfaceInterface *surf = w->surface();
|
||||
KWaylandServer::SurfaceInterface *surf = w->surface();
|
||||
if (!surf) {
|
||||
return;
|
||||
}
|
||||
|
@ -365,16 +365,16 @@ void SlidingPopupsEffect::slotWaylandSlideOnShowChanged(EffectWindow* w)
|
|||
animData.offset = surf->slideOnShowHide()->offset();
|
||||
|
||||
switch (surf->slideOnShowHide()->location()) {
|
||||
case KWayland::Server::SlideInterface::Location::Top:
|
||||
case KWaylandServer::SlideInterface::Location::Top:
|
||||
animData.location = Location::Top;
|
||||
break;
|
||||
case KWayland::Server::SlideInterface::Location::Left:
|
||||
case KWaylandServer::SlideInterface::Location::Left:
|
||||
animData.location = Location::Left;
|
||||
break;
|
||||
case KWayland::Server::SlideInterface::Location::Right:
|
||||
case KWaylandServer::SlideInterface::Location::Right:
|
||||
animData.location = Location::Right;
|
||||
break;
|
||||
case KWayland::Server::SlideInterface::Location::Bottom:
|
||||
case KWaylandServer::SlideInterface::Location::Bottom:
|
||||
default:
|
||||
animData.location = Location::Bottom;
|
||||
break;
|
||||
|
|
|
@ -63,7 +63,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "x11eventfilter.h"
|
||||
|
||||
#include "wayland_server.h"
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
|
||||
#ifndef XCB_GE_GENERIC
|
||||
#define XCB_GE_GENERIC 35
|
||||
|
@ -1345,7 +1345,7 @@ void Toplevel::clientMessageEvent(xcb_client_message_event_t *e)
|
|||
if (e->type == atoms->wl_surface_id) {
|
||||
m_surfaceId = e->data.data32[0];
|
||||
if (auto w = waylandServer()) {
|
||||
if (auto s = KWayland::Server::SurfaceInterface::get(m_surfaceId, w->xWaylandConnection())) {
|
||||
if (auto s = KWaylandServer::SurfaceInterface::get(m_surfaceId, w->xWaylandConnection())) {
|
||||
setSurface(s);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,13 +23,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "deleted.h"
|
||||
#include "workspace.h"
|
||||
|
||||
#include <KWayland/Server/idle_interface.h>
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWaylandServer/idle_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
using KWayland::Server::SurfaceInterface;
|
||||
using KWaylandServer::SurfaceInterface;
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
|
|
@ -24,15 +24,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <QVector>
|
||||
#include <QMap>
|
||||
|
||||
namespace KWayland
|
||||
{
|
||||
namespace Server
|
||||
namespace KWaylandServer
|
||||
{
|
||||
class IdleInterface;
|
||||
}
|
||||
}
|
||||
|
||||
using KWayland::Server::IdleInterface;
|
||||
using KWaylandServer::IdleInterface;
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
|
60
input.cpp
60
input.cpp
|
@ -51,13 +51,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "cursor.h"
|
||||
#include <KDecoration2/Decoration>
|
||||
#include <KGlobalAccel>
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWayland/Server/fakeinput_interface.h>
|
||||
#include <KWayland/Server/relativepointer_interface.h>
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWayland/Server/buffer_interface.h>
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWayland/Server/tablet_interface.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
#include <KWaylandServer/fakeinput_interface.h>
|
||||
#include <KWaylandServer/relativepointer_interface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
#include <KWaylandServer/buffer_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
#include <KWaylandServer/tablet_interface.h>
|
||||
#include <decorations/decoratedclient.h>
|
||||
|
||||
//screenlocker
|
||||
|
@ -421,8 +421,8 @@ public:
|
|||
return waylandServer()->isScreenLocked();
|
||||
}
|
||||
private:
|
||||
bool surfaceAllowed(KWayland::Server::SurfaceInterface *(KWayland::Server::SeatInterface::*method)() const) const {
|
||||
if (KWayland::Server::SurfaceInterface *s = (waylandServer()->seat()->*method)()) {
|
||||
bool surfaceAllowed(KWaylandServer::SurfaceInterface *(KWaylandServer::SeatInterface::*method)() const) const {
|
||||
if (KWaylandServer::SurfaceInterface *s = (waylandServer()->seat()->*method)()) {
|
||||
if (Toplevel *t = waylandServer()->findClient(s)) {
|
||||
return t->isLockScreen() || t->isInputMethod();
|
||||
}
|
||||
|
@ -431,13 +431,13 @@ private:
|
|||
return true;
|
||||
}
|
||||
bool pointerSurfaceAllowed() const {
|
||||
return surfaceAllowed(&KWayland::Server::SeatInterface::focusedPointerSurface);
|
||||
return surfaceAllowed(&KWaylandServer::SeatInterface::focusedPointerSurface);
|
||||
}
|
||||
bool keyboardSurfaceAllowed() const {
|
||||
return surfaceAllowed(&KWayland::Server::SeatInterface::focusedKeyboardSurface);
|
||||
return surfaceAllowed(&KWaylandServer::SeatInterface::focusedKeyboardSurface);
|
||||
}
|
||||
bool touchSurfaceAllowed() const {
|
||||
return surfaceAllowed(&KWayland::Server::SeatInterface::focusedTouchSurface);
|
||||
return surfaceAllowed(&KWaylandServer::SeatInterface::focusedTouchSurface);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1406,23 +1406,23 @@ public:
|
|||
auto seat = waylandServer()->seat();
|
||||
seat->setTimestamp(event->timestamp());
|
||||
auto _event = static_cast<WheelEvent *>(event);
|
||||
KWayland::Server::PointerAxisSource source;
|
||||
KWaylandServer::PointerAxisSource source;
|
||||
switch (_event->axisSource()) {
|
||||
case KWin::InputRedirection::PointerAxisSourceWheel:
|
||||
source = KWayland::Server::PointerAxisSource::Wheel;
|
||||
source = KWaylandServer::PointerAxisSource::Wheel;
|
||||
break;
|
||||
case KWin::InputRedirection::PointerAxisSourceFinger:
|
||||
source = KWayland::Server::PointerAxisSource::Finger;
|
||||
source = KWaylandServer::PointerAxisSource::Finger;
|
||||
break;
|
||||
case KWin::InputRedirection::PointerAxisSourceContinuous:
|
||||
source = KWayland::Server::PointerAxisSource::Continuous;
|
||||
source = KWaylandServer::PointerAxisSource::Continuous;
|
||||
break;
|
||||
case KWin::InputRedirection::PointerAxisSourceWheelTilt:
|
||||
source = KWayland::Server::PointerAxisSource::WheelTilt;
|
||||
source = KWaylandServer::PointerAxisSource::WheelTilt;
|
||||
break;
|
||||
case KWin::InputRedirection::PointerAxisSourceUnknown:
|
||||
default:
|
||||
source = KWayland::Server::PointerAxisSource::Unknown;
|
||||
source = KWaylandServer::PointerAxisSource::Unknown;
|
||||
break;
|
||||
}
|
||||
seat->pointerAxisV5(_event->orientation(), _event->delta(), _event->discreteDelta(), source);
|
||||
|
@ -1551,7 +1551,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
static KWayland::Server::SeatInterface *findSeat()
|
||||
static KWaylandServer::SeatInterface *findSeat()
|
||||
{
|
||||
auto server = waylandServer();
|
||||
if (!server) {
|
||||
|
@ -1570,20 +1570,20 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
static KWayland::Server::TabletSeatInterface *findTabletSeat()
|
||||
static KWaylandServer::TabletSeatInterface *findTabletSeat()
|
||||
{
|
||||
auto server = waylandServer();
|
||||
if (!server) {
|
||||
return nullptr;
|
||||
}
|
||||
KWayland::Server::TabletManagerInterface *manager = server->tabletManager();
|
||||
KWaylandServer::TabletManagerInterface *manager = server->tabletManager();
|
||||
return manager->seat(findSeat());
|
||||
}
|
||||
|
||||
void integrateDevice(LibInput::Device *device)
|
||||
{
|
||||
if (device->isTabletTool()) {
|
||||
KWayland::Server::TabletSeatInterface *tabletSeat = findTabletSeat();
|
||||
KWaylandServer::TabletSeatInterface *tabletSeat = findTabletSeat();
|
||||
struct udev_device *const udev_device = libinput_device_get_udev_device(device->device());
|
||||
const char *devnode = udev_device_get_devnode(udev_device);
|
||||
tabletSeat->addTablet(device->vendor(), device->product(), device->sysName(), device->name(), {QString::fromUtf8(devnode)});
|
||||
|
@ -1591,7 +1591,7 @@ public:
|
|||
}
|
||||
void removeDevice(const QString &sysname)
|
||||
{
|
||||
KWayland::Server::TabletSeatInterface *tabletSeat = findTabletSeat();
|
||||
KWaylandServer::TabletSeatInterface *tabletSeat = findTabletSeat();
|
||||
tabletSeat->removeTablet(sysname);
|
||||
}
|
||||
|
||||
|
@ -1601,10 +1601,10 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
KWayland::Server::TabletSeatInterface *tabletSeat = findTabletSeat();
|
||||
KWaylandServer::TabletSeatInterface *tabletSeat = findTabletSeat();
|
||||
auto tool = tabletSeat->toolByHardwareSerial(event->serialId());
|
||||
if (!tool) {
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
|
||||
const QVector<InputRedirection::Capability> capabilities = event->capabilities();
|
||||
const auto f = [](InputRedirection::Capability cap) {
|
||||
|
@ -1697,14 +1697,14 @@ public:
|
|||
emit cursor->cursorChanged();
|
||||
}
|
||||
|
||||
KWayland::Server::TabletInterface *tablet = tabletSeat->tabletByName(event->tabletSysName());
|
||||
KWaylandServer::TabletInterface *tablet = tabletSeat->tabletByName(event->tabletSysName());
|
||||
|
||||
Toplevel *toplevel = input()->findToplevel(event->globalPos());
|
||||
if (!toplevel || !toplevel->surface()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
KWayland::Server::SurfaceInterface *surface = toplevel->surface();
|
||||
KWaylandServer::SurfaceInterface *surface = toplevel->surface();
|
||||
tool->setCurrentSurface(surface);
|
||||
|
||||
if (!tool->isClientSupported() || !tablet->isSurfaceSupported(surface)) {
|
||||
|
@ -1768,7 +1768,7 @@ public:
|
|||
waylandServer()->simulateUserActivity();
|
||||
return true;
|
||||
}
|
||||
QHash<KWayland::Server::TabletToolInterface*, Cursor*> m_cursorByTool;
|
||||
QHash<KWaylandServer::TabletToolInterface*, Cursor*> m_cursorByTool;
|
||||
};
|
||||
|
||||
class DragAndDropInputFilter : public InputEventFilter
|
||||
|
@ -1981,7 +1981,7 @@ void InputRedirection::init()
|
|||
void InputRedirection::setupWorkspace()
|
||||
{
|
||||
if (waylandServer()) {
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
FakeInputInterface *fakeInput = waylandServer()->display()->createFakeInput(this);
|
||||
fakeInput->create();
|
||||
connect(fakeInput, &FakeInputInterface::deviceCreated, this,
|
||||
|
@ -2173,7 +2173,7 @@ void InputRedirection::setupLibInput()
|
|||
|
||||
if (waylandServer()) {
|
||||
// create relative pointer manager
|
||||
waylandServer()->display()->createRelativePointerManager(KWayland::Server::RelativePointerInterfaceVersion::UnstableV1, waylandServer()->display())->create();
|
||||
waylandServer()->display()->createRelativePointerManager(KWaylandServer::RelativePointerInterfaceVersion::UnstableV1, waylandServer()->display())->create();
|
||||
}
|
||||
|
||||
conn->setInputConfig(kwinApp()->inputConfig());
|
||||
|
|
|
@ -30,8 +30,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
// KWayland
|
||||
#include <KWayland/Server/datadevice_interface.h>
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWaylandServer/datadevice_interface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
//screenlocker
|
||||
#include <KScreenLocker/KsldApp>
|
||||
// Frameworks
|
||||
|
|
|
@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "input_event.h"
|
||||
#include "wayland_server.h"
|
||||
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ target_link_libraries(kwinxrenderutils
|
|||
Qt5::Core
|
||||
Qt5::Gui
|
||||
|
||||
KF5::WaylandServer
|
||||
Plasma::KWaylandServer
|
||||
|
||||
XCB::RENDER
|
||||
XCB::XCB
|
||||
|
|
|
@ -41,7 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <ksharedconfig.h>
|
||||
#include <kconfiggroup.h>
|
||||
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
|
||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||
#include <xcb/xfixes.h>
|
||||
|
|
|
@ -65,11 +65,9 @@ class QAction;
|
|||
*/
|
||||
Q_DECLARE_LOGGING_CATEGORY(KWINEFFECTS)
|
||||
|
||||
namespace KWayland {
|
||||
namespace Server {
|
||||
class SurfaceInterface;
|
||||
class Display;
|
||||
}
|
||||
namespace KWaylandServer {
|
||||
class SurfaceInterface;
|
||||
class Display;
|
||||
}
|
||||
|
||||
namespace KWin
|
||||
|
@ -1084,7 +1082,7 @@ public:
|
|||
virtual WindowQuadType newWindowQuadType() = 0;
|
||||
|
||||
Q_SCRIPTABLE virtual KWin::EffectWindow* findWindow(WId id) const = 0;
|
||||
Q_SCRIPTABLE virtual KWin::EffectWindow* findWindow(KWayland::Server::SurfaceInterface *surf) const = 0;
|
||||
Q_SCRIPTABLE virtual KWin::EffectWindow* findWindow(KWaylandServer::SurfaceInterface *surf) const = 0;
|
||||
/**
|
||||
* Finds the EffectWindow for the internal window @p w.
|
||||
* If there is no such window @c null is returned.
|
||||
|
@ -1257,7 +1255,7 @@ public:
|
|||
* on Wayland, on X11 it will be nullptr
|
||||
* @since 5.5
|
||||
*/
|
||||
virtual KWayland::Server::Display *waylandDisplay() const = 0;
|
||||
virtual KWaylandServer::Display *waylandDisplay() const = 0;
|
||||
|
||||
/**
|
||||
* Whether animations are supported by the Scene.
|
||||
|
@ -2062,7 +2060,7 @@ class KWINEFFECTS_EXPORT EffectWindow : public QObject
|
|||
* Interface to the corresponding wayland surface.
|
||||
* relevant only in Wayland, on X11 it will be nullptr
|
||||
*/
|
||||
Q_PROPERTY(KWayland::Server::SurfaceInterface *surface READ surface)
|
||||
Q_PROPERTY(KWaylandServer::SurfaceInterface *surface READ surface)
|
||||
|
||||
/**
|
||||
* Whether the window is fullscreen.
|
||||
|
@ -2409,7 +2407,7 @@ public:
|
|||
/**
|
||||
* @since 5.5
|
||||
*/
|
||||
virtual KWayland::Server::SurfaceInterface *surface() const = 0;
|
||||
virtual KWaylandServer::SurfaceInterface *surface() const = 0;
|
||||
|
||||
/**
|
||||
* @since 5.6
|
||||
|
|
|
@ -30,7 +30,7 @@ DmabufBuffer::DmabufBuffer(const QVector<Plane> &planes,
|
|||
uint32_t format,
|
||||
const QSize &size,
|
||||
Flags flags)
|
||||
: KWayland::Server::LinuxDmabufUnstableV1Buffer(format, size)
|
||||
: KWaylandServer::LinuxDmabufUnstableV1Buffer(format, size)
|
||||
, m_planes(planes)
|
||||
, m_format(format)
|
||||
, m_size(size)
|
||||
|
@ -53,7 +53,7 @@ DmabufBuffer::~DmabufBuffer()
|
|||
}
|
||||
|
||||
LinuxDmabuf::LinuxDmabuf()
|
||||
: KWayland::Server::LinuxDmabufUnstableV1Interface::Impl()
|
||||
: KWaylandServer::LinuxDmabufUnstableV1Interface::Impl()
|
||||
{
|
||||
Q_ASSERT(waylandServer());
|
||||
waylandServer()->linuxDmabuf()->setImpl(this);
|
||||
|
@ -64,10 +64,10 @@ LinuxDmabuf::~LinuxDmabuf()
|
|||
waylandServer()->linuxDmabuf()->setImpl(nullptr);
|
||||
}
|
||||
|
||||
using Plane = KWayland::Server::LinuxDmabufUnstableV1Interface::Plane;
|
||||
using Flags = KWayland::Server::LinuxDmabufUnstableV1Interface::Flags;
|
||||
using Plane = KWaylandServer::LinuxDmabufUnstableV1Interface::Plane;
|
||||
using Flags = KWaylandServer::LinuxDmabufUnstableV1Interface::Flags;
|
||||
|
||||
KWayland::Server::LinuxDmabufUnstableV1Buffer* LinuxDmabuf::importBuffer(const QVector<Plane> &planes,
|
||||
KWaylandServer::LinuxDmabufUnstableV1Buffer* LinuxDmabuf::importBuffer(const QVector<Plane> &planes,
|
||||
uint32_t format,
|
||||
const QSize &size,
|
||||
Flags flags)
|
||||
|
|
|
@ -21,18 +21,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <kwin_export.h>
|
||||
|
||||
#include <KWayland/Server/linuxdmabuf_v1_interface.h>
|
||||
#include <KWaylandServer/linuxdmabuf_v1_interface.h>
|
||||
|
||||
#include <QVector>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
class KWIN_EXPORT DmabufBuffer : public KWayland::Server::LinuxDmabufUnstableV1Buffer
|
||||
class KWIN_EXPORT DmabufBuffer : public KWaylandServer::LinuxDmabufUnstableV1Buffer
|
||||
{
|
||||
public:
|
||||
using Plane = KWayland::Server::LinuxDmabufUnstableV1Interface::Plane;
|
||||
using Flags = KWayland::Server::LinuxDmabufUnstableV1Interface::Flags;
|
||||
using Plane = KWaylandServer::LinuxDmabufUnstableV1Interface::Plane;
|
||||
using Flags = KWaylandServer::LinuxDmabufUnstableV1Interface::Flags;
|
||||
|
||||
DmabufBuffer(const QVector<Plane> &planes,
|
||||
uint32_t format,
|
||||
|
@ -53,16 +53,16 @@ private:
|
|||
Flags m_flags;
|
||||
};
|
||||
|
||||
class KWIN_EXPORT LinuxDmabuf : public KWayland::Server::LinuxDmabufUnstableV1Interface::Impl
|
||||
class KWIN_EXPORT LinuxDmabuf : public KWaylandServer::LinuxDmabufUnstableV1Interface::Impl
|
||||
{
|
||||
public:
|
||||
using Plane = KWayland::Server::LinuxDmabufUnstableV1Interface::Plane;
|
||||
using Flags = KWayland::Server::LinuxDmabufUnstableV1Interface::Flags;
|
||||
using Plane = KWaylandServer::LinuxDmabufUnstableV1Interface::Plane;
|
||||
using Flags = KWaylandServer::LinuxDmabufUnstableV1Interface::Flags;
|
||||
|
||||
explicit LinuxDmabuf();
|
||||
~LinuxDmabuf() override;
|
||||
|
||||
KWayland::Server::LinuxDmabufUnstableV1Buffer *importBuffer(const QVector<Plane> &planes,
|
||||
KWaylandServer::LinuxDmabufUnstableV1Buffer *importBuffer(const QVector<Plane> &planes,
|
||||
uint32_t format,
|
||||
const QSize &size,
|
||||
Flags flags) override;
|
||||
|
|
4
main.cpp
4
main.cpp
|
@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <KLocalizedString>
|
||||
#include <KPluginMetaData>
|
||||
#include <KSharedConfig>
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
// Qt
|
||||
#include <qplatformdefs.h>
|
||||
#include <QCommandLineParser>
|
||||
|
@ -111,7 +111,7 @@ Application::Application(Application::OperationMode mode, int &argc, char **argv
|
|||
{
|
||||
qRegisterMetaType<Options::WindowOperation>("Options::WindowOperation");
|
||||
qRegisterMetaType<KWin::EffectWindow*>();
|
||||
qRegisterMetaType<KWayland::Server::SurfaceInterface *>("KWayland::Server::SurfaceInterface *");
|
||||
qRegisterMetaType<KWaylandServer::SurfaceInterface *>("KWaylandServer::SurfaceInterface *");
|
||||
qRegisterMetaType<KSharedConfigPtr>();
|
||||
}
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "xwl/xwayland.h"
|
||||
|
||||
// KWayland
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
// KDE
|
||||
#include <KCrash>
|
||||
#include <KLocalizedString>
|
||||
|
|
12
platform.cpp
12
platform.cpp
|
@ -34,8 +34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "wayland_server.h"
|
||||
#include "colorcorrection/manager.h"
|
||||
|
||||
#include <KWayland/Server/outputconfiguration_interface.h>
|
||||
#include <KWayland/Server/outputchangeset.h>
|
||||
#include <KWaylandServer/outputconfiguration_interface.h>
|
||||
#include <KWaylandServer/outputchangeset.h>
|
||||
|
||||
#include <QX11Info>
|
||||
|
||||
|
@ -121,7 +121,7 @@ void Platform::createPlatformCursor(QObject *parent)
|
|||
new InputRedirectionCursor(parent);
|
||||
}
|
||||
|
||||
void Platform::requestOutputsChange(KWayland::Server::OutputConfigurationInterface *config)
|
||||
void Platform::requestOutputsChange(KWaylandServer::OutputConfigurationInterface *config)
|
||||
{
|
||||
if (!m_supportsOutputChanges) {
|
||||
qCWarning(KWIN_CORE) << "This backend does not support configuration changes.";
|
||||
|
@ -129,13 +129,13 @@ void Platform::requestOutputsChange(KWayland::Server::OutputConfigurationInterfa
|
|||
return;
|
||||
}
|
||||
|
||||
using Enablement = KWayland::Server::OutputDeviceInterface::Enablement;
|
||||
using Enablement = KWaylandServer::OutputDeviceInterface::Enablement;
|
||||
|
||||
const auto changes = config->changes();
|
||||
|
||||
//process all non-disabling changes
|
||||
for (auto it = changes.begin(); it != changes.end(); it++) {
|
||||
const KWayland::Server::OutputChangeSet *changeset = it.value();
|
||||
const KWaylandServer::OutputChangeSet *changeset = it.value();
|
||||
|
||||
auto output = findOutput(it.key()->uuid());
|
||||
if (!output) {
|
||||
|
@ -152,7 +152,7 @@ void Platform::requestOutputsChange(KWayland::Server::OutputConfigurationInterfa
|
|||
|
||||
//process any disable requests
|
||||
for (auto it = changes.begin(); it != changes.end(); it++) {
|
||||
const KWayland::Server::OutputChangeSet *changeset = it.value();
|
||||
const KWaylandServer::OutputChangeSet *changeset = it.value();
|
||||
|
||||
if (changeset->enabledChanged() &&
|
||||
changeset->enabled() == Enablement::Disabled) {
|
||||
|
|
|
@ -33,10 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
class QAction;
|
||||
|
||||
namespace KWayland {
|
||||
namespace Server {
|
||||
class OutputConfigurationInterface;
|
||||
}
|
||||
namespace KWaylandServer {
|
||||
class OutputConfigurationInterface;
|
||||
}
|
||||
|
||||
namespace KWin
|
||||
|
@ -184,7 +182,7 @@ public:
|
|||
* Base implementation warns that the current backend does not implement this
|
||||
* functionality.
|
||||
*/
|
||||
void requestOutputsChange(KWayland::Server::OutputConfigurationInterface *config);
|
||||
void requestOutputsChange(KWaylandServer::OutputConfigurationInterface *config);
|
||||
|
||||
/**
|
||||
* Whether the Platform requires compositing for rendering.
|
||||
|
|
|
@ -21,4 +21,4 @@ ecm_qt_declare_logging_category(SCENE_OPENGL_BACKEND_SRCS
|
|||
)
|
||||
|
||||
add_library(SceneOpenGLBackend STATIC ${SCENE_OPENGL_BACKEND_SRCS})
|
||||
target_link_libraries(SceneOpenGLBackend Qt5::Core Qt5::Widgets KF5::CoreAddons KF5::ConfigCore KF5::WindowSystem KF5::WaylandServer)
|
||||
target_link_libraries(SceneOpenGLBackend Qt5::Core Qt5::Widgets KF5::CoreAddons KF5::ConfigCore KF5::WindowSystem Plasma::KWaylandServer)
|
||||
|
|
|
@ -26,9 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "platform.h"
|
||||
#include "scene.h"
|
||||
#include "wayland_server.h"
|
||||
#include <KWayland/Server/buffer_interface.h>
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWaylandServer/buffer_interface.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
// kwin libs
|
||||
#include <logging.h>
|
||||
#include <kwinglplatform.h>
|
||||
|
@ -397,7 +397,7 @@ void AbstractEglTexture::updateTexture(WindowPixmap *pixmap)
|
|||
m_image = EGL_NO_IMAGE_KHR; // The wl_buffer has ownership of the image
|
||||
// The origin in a dmabuf-buffer is at the upper-left corner, so the meaning
|
||||
// of Y-inverted is the inverse of OpenGL.
|
||||
const bool yInverted = !(dmabuf->flags() & KWayland::Server::LinuxDmabufUnstableV1Interface::YInverted);
|
||||
const bool yInverted = !(dmabuf->flags() & KWaylandServer::LinuxDmabufUnstableV1Interface::YInverted);
|
||||
if (m_size != dmabuf->size() || yInverted != q->isYInverted()) {
|
||||
m_size = dmabuf->size();
|
||||
q->setYInverted(yInverted);
|
||||
|
@ -516,12 +516,12 @@ void AbstractEglTexture::createTextureSubImage(int scale, const QImage &image, c
|
|||
q->unbind();
|
||||
}
|
||||
|
||||
bool AbstractEglTexture::loadShmTexture(const QPointer< KWayland::Server::BufferInterface > &buffer)
|
||||
bool AbstractEglTexture::loadShmTexture(const QPointer< KWaylandServer::BufferInterface > &buffer)
|
||||
{
|
||||
return createTextureImage(buffer->data());
|
||||
}
|
||||
|
||||
bool AbstractEglTexture::loadEglTexture(const QPointer< KWayland::Server::BufferInterface > &buffer)
|
||||
bool AbstractEglTexture::loadEglTexture(const QPointer< KWaylandServer::BufferInterface > &buffer)
|
||||
{
|
||||
if (!eglQueryWaylandBufferWL) {
|
||||
return false;
|
||||
|
@ -546,7 +546,7 @@ bool AbstractEglTexture::loadEglTexture(const QPointer< KWayland::Server::Buffer
|
|||
return true;
|
||||
}
|
||||
|
||||
bool AbstractEglTexture::loadDmabufTexture(const QPointer< KWayland::Server::BufferInterface > &buffer)
|
||||
bool AbstractEglTexture::loadDmabufTexture(const QPointer< KWaylandServer::BufferInterface > &buffer)
|
||||
{
|
||||
auto *dmabuf = static_cast<EglDmabufBuffer *>(buffer->linuxDmabufBuffer());
|
||||
if (!dmabuf || dmabuf->images()[0] == EGL_NO_IMAGE_KHR) {
|
||||
|
@ -565,7 +565,7 @@ bool AbstractEglTexture::loadDmabufTexture(const QPointer< KWayland::Server::Buf
|
|||
q->unbind();
|
||||
|
||||
m_size = dmabuf->size();
|
||||
q->setYInverted(!(dmabuf->flags() & KWayland::Server::LinuxDmabufUnstableV1Interface::YInverted));
|
||||
q->setYInverted(!(dmabuf->flags() & KWaylandServer::LinuxDmabufUnstableV1Interface::YInverted));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ bool AbstractEglTexture::loadInternalImageObject(WindowPixmap *pixmap)
|
|||
return createTextureImage(pixmap->internalImage());
|
||||
}
|
||||
|
||||
EGLImageKHR AbstractEglTexture::attach(const QPointer< KWayland::Server::BufferInterface > &buffer)
|
||||
EGLImageKHR AbstractEglTexture::attach(const QPointer< KWaylandServer::BufferInterface > &buffer)
|
||||
{
|
||||
EGLint format, yInverted;
|
||||
eglQueryWaylandBufferWL(m_backend->eglDisplay(), buffer->resource(), EGL_TEXTURE_FORMAT, &format);
|
||||
|
|
|
@ -28,13 +28,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
class QOpenGLFramebufferObject;
|
||||
|
||||
namespace KWayland
|
||||
{
|
||||
namespace Server
|
||||
namespace KWaylandServer
|
||||
{
|
||||
class BufferInterface;
|
||||
}
|
||||
}
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -113,11 +110,11 @@ protected:
|
|||
private:
|
||||
void createTextureSubImage(int scale, const QImage &image, const QRegion &damage);
|
||||
bool createTextureImage(const QImage &image);
|
||||
bool loadShmTexture(const QPointer<KWayland::Server::BufferInterface> &buffer);
|
||||
bool loadEglTexture(const QPointer<KWayland::Server::BufferInterface> &buffer);
|
||||
bool loadDmabufTexture(const QPointer< KWayland::Server::BufferInterface > &buffer);
|
||||
bool loadShmTexture(const QPointer<KWaylandServer::BufferInterface> &buffer);
|
||||
bool loadEglTexture(const QPointer<KWaylandServer::BufferInterface> &buffer);
|
||||
bool loadDmabufTexture(const QPointer< KWaylandServer::BufferInterface > &buffer);
|
||||
bool loadInternalImageObject(WindowPixmap *pixmap);
|
||||
EGLImageKHR attach(const QPointer<KWayland::Server::BufferInterface> &buffer);
|
||||
EGLImageKHR attach(const QPointer<KWaylandServer::BufferInterface> &buffer);
|
||||
bool updateFromFBO(const QSharedPointer<QOpenGLFramebufferObject> &fbo);
|
||||
bool updateFromInternalImageObject(WindowPixmap *pixmap);
|
||||
SceneOpenGLTexture *q;
|
||||
|
|
|
@ -218,8 +218,8 @@ void EglDmabufBuffer::removeImages()
|
|||
m_images.clear();
|
||||
}
|
||||
|
||||
using Plane = KWayland::Server::LinuxDmabufUnstableV1Interface::Plane;
|
||||
using Flags = KWayland::Server::LinuxDmabufUnstableV1Interface::Flags;
|
||||
using Plane = KWaylandServer::LinuxDmabufUnstableV1Interface::Plane;
|
||||
using Flags = KWaylandServer::LinuxDmabufUnstableV1Interface::Flags;
|
||||
|
||||
EGLImage EglDmabuf::createImage(const QVector<Plane> &planes,
|
||||
uint32_t format,
|
||||
|
@ -296,7 +296,7 @@ EGLImage EglDmabuf::createImage(const QVector<Plane> &planes,
|
|||
return image;
|
||||
}
|
||||
|
||||
KWayland::Server::LinuxDmabufUnstableV1Buffer* EglDmabuf::importBuffer(const QVector<Plane> &planes,
|
||||
KWaylandServer::LinuxDmabufUnstableV1Buffer* EglDmabuf::importBuffer(const QVector<Plane> &planes,
|
||||
uint32_t format,
|
||||
const QSize &size,
|
||||
Flags flags)
|
||||
|
@ -316,7 +316,7 @@ KWayland::Server::LinuxDmabufUnstableV1Buffer* EglDmabuf::importBuffer(const QVe
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
KWayland::Server::LinuxDmabufUnstableV1Buffer* EglDmabuf::yuvImport(const QVector<Plane> &planes,
|
||||
KWaylandServer::LinuxDmabufUnstableV1Buffer* EglDmabuf::yuvImport(const QVector<Plane> &planes,
|
||||
uint32_t format,
|
||||
const QSize &size,
|
||||
Flags flags)
|
||||
|
|
|
@ -33,8 +33,8 @@ class EglDmabuf;
|
|||
class EglDmabufBuffer : public DmabufBuffer
|
||||
{
|
||||
public:
|
||||
using Plane = KWayland::Server::LinuxDmabufUnstableV1Interface::Plane;
|
||||
using Flags = KWayland::Server::LinuxDmabufUnstableV1Interface::Flags;
|
||||
using Plane = KWaylandServer::LinuxDmabufUnstableV1Interface::Plane;
|
||||
using Flags = KWaylandServer::LinuxDmabufUnstableV1Interface::Flags;
|
||||
|
||||
enum class ImportType {
|
||||
Direct,
|
||||
|
@ -71,15 +71,15 @@ private:
|
|||
class EglDmabuf : public LinuxDmabuf
|
||||
{
|
||||
public:
|
||||
using Plane = KWayland::Server::LinuxDmabufUnstableV1Interface::Plane;
|
||||
using Flags = KWayland::Server::LinuxDmabufUnstableV1Interface::Flags;
|
||||
using Plane = KWaylandServer::LinuxDmabufUnstableV1Interface::Plane;
|
||||
using Flags = KWaylandServer::LinuxDmabufUnstableV1Interface::Flags;
|
||||
|
||||
static EglDmabuf* factory(AbstractEglBackend *backend);
|
||||
|
||||
explicit EglDmabuf(AbstractEglBackend *backend);
|
||||
~EglDmabuf() override;
|
||||
|
||||
KWayland::Server::LinuxDmabufUnstableV1Buffer *importBuffer(const QVector<Plane> &planes,
|
||||
KWaylandServer::LinuxDmabufUnstableV1Buffer *importBuffer(const QVector<Plane> &planes,
|
||||
uint32_t format,
|
||||
const QSize &size,
|
||||
Flags flags) override;
|
||||
|
@ -89,7 +89,7 @@ private:
|
|||
uint32_t format,
|
||||
const QSize &size);
|
||||
|
||||
KWayland::Server::LinuxDmabufUnstableV1Buffer *yuvImport(const QVector<Plane> &planes,
|
||||
KWaylandServer::LinuxDmabufUnstableV1Buffer *yuvImport(const QVector<Plane> &planes,
|
||||
uint32_t format,
|
||||
const QSize &size,
|
||||
Flags flags);
|
||||
|
|
|
@ -39,7 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "egl_stream_backend.h"
|
||||
#endif
|
||||
// KWayland
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
// KF5
|
||||
#include <KConfigGroup>
|
||||
#include <KCoreAddons>
|
||||
|
@ -156,7 +156,7 @@ void DrmBackend::turnOutputsOn()
|
|||
{
|
||||
m_dpmsFilter.reset();
|
||||
for (auto it = m_enabledOutputs.constBegin(), end = m_enabledOutputs.constEnd(); it != end; it++) {
|
||||
(*it)->updateDpms(KWayland::Server::OutputInterface::DpmsMode::On);
|
||||
(*it)->updateDpms(KWaylandServer::OutputInterface::DpmsMode::On);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -634,7 +634,7 @@ void DrmBackend::initCursor()
|
|||
#endif
|
||||
|
||||
m_cursorEnabled = waylandServer()->seat()->hasPointer();
|
||||
connect(waylandServer()->seat(), &KWayland::Server::SeatInterface::hasPointerChanged, this,
|
||||
connect(waylandServer()->seat(), &KWaylandServer::SeatInterface::hasPointerChanged, this,
|
||||
[this] {
|
||||
m_cursorEnabled = waylandServer()->seat()->hasPointer();
|
||||
if (usesSoftwareCursor()) {
|
||||
|
|
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <QApplication>
|
||||
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens_drm.h"
|
||||
#include "wayland_server.h"
|
||||
// KWayland
|
||||
#include <KWayland/Server/output_interface.h>
|
||||
#include <KWaylandServer/output_interface.h>
|
||||
// KF5
|
||||
#include <KConfigGroup>
|
||||
#include <KLocalizedString>
|
||||
|
@ -282,7 +282,7 @@ bool DrmOutput::init(drmModeConnector *connector)
|
|||
return false;
|
||||
}
|
||||
|
||||
updateDpms(KWayland::Server::OutputInterface::DpmsMode::On);
|
||||
updateDpms(KWaylandServer::OutputInterface::DpmsMode::On);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -324,20 +324,20 @@ void DrmOutput::initOutputDevice(drmModeConnector *connector)
|
|||
const QString model = connectorName + QStringLiteral("-") + modelName;
|
||||
|
||||
// read in mode information
|
||||
QVector<KWayland::Server::OutputDeviceInterface::Mode> modes;
|
||||
QVector<KWaylandServer::OutputDeviceInterface::Mode> modes;
|
||||
for (int i = 0; i < connector->count_modes; ++i) {
|
||||
// TODO: in AMS here we could read and store for later every mode's blob_id
|
||||
// would simplify isCurrentMode(..) and presentAtomically(..) in case of mode set
|
||||
auto *m = &connector->modes[i];
|
||||
KWayland::Server::OutputDeviceInterface::ModeFlags deviceflags;
|
||||
KWaylandServer::OutputDeviceInterface::ModeFlags deviceflags;
|
||||
if (isCurrentMode(m)) {
|
||||
deviceflags |= KWayland::Server::OutputDeviceInterface::ModeFlag::Current;
|
||||
deviceflags |= KWaylandServer::OutputDeviceInterface::ModeFlag::Current;
|
||||
}
|
||||
if (m->type & DRM_MODE_TYPE_PREFERRED) {
|
||||
deviceflags |= KWayland::Server::OutputDeviceInterface::ModeFlag::Preferred;
|
||||
deviceflags |= KWaylandServer::OutputDeviceInterface::ModeFlag::Preferred;
|
||||
}
|
||||
|
||||
KWayland::Server::OutputDeviceInterface::Mode mode;
|
||||
KWaylandServer::OutputDeviceInterface::Mode mode;
|
||||
mode.id = i;
|
||||
mode.size = QSize(m->hdisplay, m->vdisplay);
|
||||
mode.flags = deviceflags;
|
||||
|
@ -535,9 +535,9 @@ void DrmOutput::atomicDisable()
|
|||
}
|
||||
}
|
||||
|
||||
static DrmOutput::DpmsMode fromWaylandDpmsMode(KWayland::Server::OutputInterface::DpmsMode wlMode)
|
||||
static DrmOutput::DpmsMode fromWaylandDpmsMode(KWaylandServer::OutputInterface::DpmsMode wlMode)
|
||||
{
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
switch (wlMode) {
|
||||
case OutputInterface::DpmsMode::On:
|
||||
return DrmOutput::DpmsMode::On;
|
||||
|
@ -552,9 +552,9 @@ static DrmOutput::DpmsMode fromWaylandDpmsMode(KWayland::Server::OutputInterface
|
|||
}
|
||||
}
|
||||
|
||||
static KWayland::Server::OutputInterface::DpmsMode toWaylandDpmsMode(DrmOutput::DpmsMode mode)
|
||||
static KWaylandServer::OutputInterface::DpmsMode toWaylandDpmsMode(DrmOutput::DpmsMode mode)
|
||||
{
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
switch (mode) {
|
||||
case DrmOutput::DpmsMode::On:
|
||||
return OutputInterface::DpmsMode::On;
|
||||
|
@ -569,7 +569,7 @@ static KWayland::Server::OutputInterface::DpmsMode toWaylandDpmsMode(DrmOutput::
|
|||
}
|
||||
}
|
||||
|
||||
void DrmOutput::updateDpms(KWayland::Server::OutputInterface::DpmsMode mode)
|
||||
void DrmOutput::updateDpms(KWaylandServer::OutputInterface::DpmsMode mode)
|
||||
{
|
||||
if (m_dpms.isNull() || !isEnabled()) {
|
||||
return;
|
||||
|
|
|
@ -146,7 +146,7 @@ private:
|
|||
void dpmsFinishOff();
|
||||
|
||||
bool atomicReqModesetPopulate(drmModeAtomicReq *req, bool enable);
|
||||
void updateDpms(KWayland::Server::OutputInterface::DpmsMode mode) override;
|
||||
void updateDpms(KWaylandServer::OutputInterface::DpmsMode mode) override;
|
||||
void updateMode(int modeIndex) override;
|
||||
void setWaylandMode();
|
||||
|
||||
|
|
|
@ -31,11 +31,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "wayland_server.h"
|
||||
#include <kwinglplatform.h>
|
||||
#include <QOpenGLContext>
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWayland/Server/buffer_interface.h>
|
||||
#include <KWayland/Server/eglstream_controller_interface.h>
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWayland/Server/resource.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
#include <KWaylandServer/buffer_interface.h>
|
||||
#include <KWaylandServer/eglstream_controller_interface.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
#include <KWaylandServer/resource.h>
|
||||
#include <wayland-server-core.h>
|
||||
|
||||
namespace KWin
|
||||
|
@ -210,7 +210,7 @@ bool EglStreamBackend::initializeEgl()
|
|||
return true;
|
||||
}
|
||||
|
||||
EglStreamBackend::StreamTexture *EglStreamBackend::lookupStreamTexture(KWayland::Server::SurfaceInterface *surface)
|
||||
EglStreamBackend::StreamTexture *EglStreamBackend::lookupStreamTexture(KWaylandServer::SurfaceInterface *surface)
|
||||
{
|
||||
auto it = m_streamTextures.find(surface);
|
||||
return it != m_streamTextures.end() ?
|
||||
|
@ -218,7 +218,7 @@ EglStreamBackend::StreamTexture *EglStreamBackend::lookupStreamTexture(KWayland:
|
|||
nullptr;
|
||||
}
|
||||
|
||||
void EglStreamBackend::attachStreamConsumer(KWayland::Server::SurfaceInterface *surface,
|
||||
void EglStreamBackend::attachStreamConsumer(KWaylandServer::SurfaceInterface *surface,
|
||||
void *eglStream,
|
||||
wl_array *attribs)
|
||||
{
|
||||
|
@ -248,7 +248,7 @@ void EglStreamBackend::attachStreamConsumer(KWayland::Server::SurfaceInterface *
|
|||
m_streamTextures.insert(surface, newSt);
|
||||
texture = newSt.texture;
|
||||
|
||||
connect(surface, &KWayland::Server::Resource::unbound, this,
|
||||
connect(surface, &KWaylandServer::Resource::unbound, this,
|
||||
[surface, this]() {
|
||||
const StreamTexture &st = m_streamTextures.take(surface);
|
||||
pEglDestroyStreamKHR(eglDisplay(), st.stream);
|
||||
|
@ -283,7 +283,7 @@ void EglStreamBackend::init()
|
|||
setSupportsBufferAge(false);
|
||||
initWayland();
|
||||
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
m_eglStreamControllerInterface = waylandServer()->display()->createEglStreamControllerInterface();
|
||||
connect(m_eglStreamControllerInterface, &EglStreamControllerInterface::streamConsumerAttached, this,
|
||||
&EglStreamBackend::attachStreamConsumer);
|
||||
|
@ -618,7 +618,7 @@ void EglStreamTexture::copyExternalTexture(GLuint tex)
|
|||
glViewport(oldViewport[0], oldViewport[1], oldViewport[2], oldViewport[3]);
|
||||
}
|
||||
|
||||
bool EglStreamTexture::attachBuffer(KWayland::Server::BufferInterface *buffer)
|
||||
bool EglStreamTexture::attachBuffer(KWaylandServer::BufferInterface *buffer)
|
||||
{
|
||||
QSize oldSize = m_size;
|
||||
m_size = buffer->size();
|
||||
|
@ -639,7 +639,7 @@ bool EglStreamTexture::attachBuffer(KWayland::Server::BufferInterface *buffer)
|
|||
|
||||
bool EglStreamTexture::loadTexture(WindowPixmap *pixmap)
|
||||
{
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
SurfaceInterface *surface = pixmap->surface();
|
||||
const EglStreamBackend::StreamTexture *st = m_backend->lookupStreamTexture(surface);
|
||||
if (!pixmap->buffer().isNull() && st != nullptr) {
|
||||
|
@ -667,7 +667,7 @@ bool EglStreamTexture::loadTexture(WindowPixmap *pixmap)
|
|||
|
||||
void EglStreamTexture::updateTexture(WindowPixmap *pixmap)
|
||||
{
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
SurfaceInterface *surface = pixmap->surface();
|
||||
const EglStreamBackend::StreamTexture *st = m_backend->lookupStreamTexture(surface);
|
||||
if (!pixmap->buffer().isNull() && st != nullptr) {
|
||||
|
|
|
@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#ifndef KWIN_EGL_STREAM_BACKEND_H
|
||||
#define KWIN_EGL_STREAM_BACKEND_H
|
||||
#include "abstract_egl_backend.h"
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWayland/Server/eglstream_controller_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
#include <KWaylandServer/eglstream_controller_interface.h>
|
||||
#include <wayland-server-core.h>
|
||||
|
||||
namespace KWin
|
||||
|
@ -63,8 +63,8 @@ private:
|
|||
EGLStreamKHR stream;
|
||||
GLuint texture;
|
||||
};
|
||||
StreamTexture *lookupStreamTexture(KWayland::Server::SurfaceInterface *surface);
|
||||
void attachStreamConsumer(KWayland::Server::SurfaceInterface *surface,
|
||||
StreamTexture *lookupStreamTexture(KWaylandServer::SurfaceInterface *surface);
|
||||
void attachStreamConsumer(KWaylandServer::SurfaceInterface *surface,
|
||||
void *eglStream,
|
||||
wl_array *attribs);
|
||||
struct Output
|
||||
|
@ -82,8 +82,8 @@ private:
|
|||
|
||||
DrmBackend *m_backend;
|
||||
QVector<Output> m_outputs;
|
||||
KWayland::Server::EglStreamControllerInterface *m_eglStreamControllerInterface;
|
||||
QHash<KWayland::Server::SurfaceInterface *, StreamTexture> m_streamTextures;
|
||||
KWaylandServer::EglStreamControllerInterface *m_eglStreamControllerInterface;
|
||||
QHash<KWaylandServer::SurfaceInterface *, StreamTexture> m_streamTextures;
|
||||
|
||||
friend class EglStreamTexture;
|
||||
};
|
||||
|
@ -103,7 +103,7 @@ private:
|
|||
bool acquireStreamFrame(EGLStreamKHR stream);
|
||||
void createFbo();
|
||||
void copyExternalTexture(GLuint tex);
|
||||
bool attachBuffer(KWayland::Server::BufferInterface *buffer);
|
||||
bool attachBuffer(KWaylandServer::BufferInterface *buffer);
|
||||
EglStreamBackend *m_backend;
|
||||
GLuint m_fbo, m_rbo;
|
||||
GLenum m_format;
|
||||
|
|
|
@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "../../../wayland_server.h"
|
||||
|
||||
// system
|
||||
#include <KWayland/Server/output_interface.h>
|
||||
#include <KWaylandServer/output_interface.h>
|
||||
#include <unistd.h>
|
||||
#include <gbm.h>
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define REMOTEACCESSMANAGER_H
|
||||
|
||||
// KWayland
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWayland/Server/remote_access_interface.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
#include <KWaylandServer/remote_access_interface.h>
|
||||
// Qt
|
||||
#include <QObject>
|
||||
|
||||
|
@ -35,8 +35,8 @@ namespace KWin
|
|||
class DrmOutput;
|
||||
class DrmBuffer;
|
||||
|
||||
using KWayland::Server::RemoteAccessManagerInterface;
|
||||
using KWayland::Server::BufferHandle;
|
||||
using KWaylandServer::RemoteAccessManagerInterface;
|
||||
using KWaylandServer::BufferHandle;
|
||||
|
||||
class RemoteAccessManager : public QObject
|
||||
{
|
||||
|
|
|
@ -45,10 +45,10 @@ FramebufferOutput::FramebufferOutput(QObject *parent):
|
|||
|
||||
void FramebufferOutput::init(const QSize &pixelSize, const QSize &physicalSize)
|
||||
{
|
||||
KWayland::Server::OutputDeviceInterface::Mode mode;
|
||||
KWaylandServer::OutputDeviceInterface::Mode mode;
|
||||
mode.id = 0;
|
||||
mode.size = pixelSize;
|
||||
mode.flags = KWayland::Server::OutputDeviceInterface::ModeFlag::Current;
|
||||
mode.flags = KWaylandServer::OutputDeviceInterface::ModeFlag::Current;
|
||||
mode.refreshRate = 60000; // TODO: get actual refresh rate of fb device?
|
||||
initInterfaces("model_TODO", "manufacturer_TODO", "UUID_TODO", physicalSize, { mode });
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "main.h"
|
||||
#include "wayland_server.h"
|
||||
// KWayland
|
||||
#include <KWayland/Server/output_interface.h>
|
||||
#include <KWaylandServer/output_interface.h>
|
||||
// KDE
|
||||
#include <KConfigGroup>
|
||||
// Qt
|
||||
|
@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
// based on test_hwcomposer.c from libhybris project (Apache 2 licensed)
|
||||
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -226,7 +226,7 @@ void HwcomposerBackend::init()
|
|||
}
|
||||
|
||||
if (m_lights) {
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
|
||||
auto updateDpms = [this] {
|
||||
if (!m_output || !m_output->waylandOutput()) {
|
||||
|
@ -236,7 +236,7 @@ void HwcomposerBackend::init()
|
|||
connect(this, &HwcomposerBackend::outputBlankChanged, this, updateDpms);
|
||||
|
||||
connect(m_output.data(), &HwcomposerOutput::dpmsModeRequested, this,
|
||||
[this] (KWayland::Server::OutputInterface::DpmsMode mode) {
|
||||
[this] (KWaylandServer::OutputInterface::DpmsMode mode) {
|
||||
if (mode == OutputInterface::DpmsMode::On) {
|
||||
if (m_outputBlank) {
|
||||
toggleBlankOutput();
|
||||
|
@ -541,7 +541,7 @@ bool HwcomposerOutput::isValid() const
|
|||
return isEnabled();
|
||||
}
|
||||
|
||||
void HwcomposerOutput::updateDpms(KWayland::Server::OutputInterface::DpmsMode mode)
|
||||
void HwcomposerOutput::updateDpms(KWaylandServer::OutputInterface::DpmsMode mode)
|
||||
{
|
||||
emit dpmsModeRequested(mode);
|
||||
}
|
||||
|
|
|
@ -55,9 +55,9 @@ public:
|
|||
~HwcomposerOutput() override;
|
||||
bool isValid() const;
|
||||
|
||||
void updateDpms(KWayland::Server::OutputInterface::DpmsMode mode) override;
|
||||
void updateDpms(KWaylandServer::OutputInterface::DpmsMode mode) override;
|
||||
Q_SIGNALS:
|
||||
void dpmsModeRequested(KWayland::Server::OutputInterface::DpmsMode mode);
|
||||
void dpmsModeRequested(KWaylandServer::OutputInterface::DpmsMode mode);
|
||||
private:
|
||||
QSize m_pixelSize;
|
||||
hwc_composer_device_1_t *m_device;
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// Qt
|
||||
#include <QTemporaryDir>
|
||||
// KWayland
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
// system
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -37,10 +37,10 @@ VirtualOutput::~VirtualOutput()
|
|||
|
||||
void VirtualOutput::init(const QPoint &logicalPosition, const QSize &pixelSize)
|
||||
{
|
||||
KWayland::Server::OutputDeviceInterface::Mode mode;
|
||||
KWaylandServer::OutputDeviceInterface::Mode mode;
|
||||
mode.id = 0;
|
||||
mode.size = pixelSize;
|
||||
mode.flags = KWayland::Server::OutputDeviceInterface::ModeFlag::Current;
|
||||
mode.flags = KWaylandServer::OutputDeviceInterface::ModeFlag::Current;
|
||||
mode.refreshRate = 60000; // TODO
|
||||
initInterfaces("model_TODO", "manufacturer_TODO", "UUID_TODO", pixelSize, { mode });
|
||||
setGeometry(QRect(logicalPosition, pixelSize));
|
||||
|
|
|
@ -37,8 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
// KDE
|
||||
#include <KWayland/Client/surface.h>
|
||||
#include <KWayland/Server/buffer_interface.h>
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWaylandServer/buffer_interface.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
|
||||
// Qt
|
||||
#include <QOpenGLContext>
|
||||
|
|
|
@ -58,7 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <KWayland/Client/touch.h>
|
||||
#include <KWayland/Client/xdgshell.h>
|
||||
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
|
||||
#include <QMetaMethod>
|
||||
#include <QThread>
|
||||
|
@ -338,7 +338,7 @@ WaylandSeat::WaylandSeat(wl_seat *seat, WaylandBackend *backend)
|
|||
);
|
||||
WaylandServer *server = waylandServer();
|
||||
if (server) {
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
SeatInterface *si = server->seat();
|
||||
connect(m_seat, &Seat::hasKeyboardChanged, si, &SeatInterface::setHasKeyboard);
|
||||
connect(m_seat, &Seat::hasPointerChanged, si, &SeatInterface::setHasPointer);
|
||||
|
|
|
@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <KWayland/Client/pointerconstraints.h>
|
||||
#include <KWayland/Client/surface.h>
|
||||
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
|
@ -59,10 +59,10 @@ WaylandOutput::~WaylandOutput()
|
|||
|
||||
void WaylandOutput::init(const QPoint &logicalPosition, const QSize &pixelSize)
|
||||
{
|
||||
KWayland::Server::OutputDeviceInterface::Mode mode;
|
||||
KWaylandServer::OutputDeviceInterface::Mode mode;
|
||||
mode.id = 0;
|
||||
mode.size = pixelSize;
|
||||
mode.flags = KWayland::Server::OutputDeviceInterface::ModeFlag::Current;
|
||||
mode.flags = KWaylandServer::OutputDeviceInterface::ModeFlag::Current;
|
||||
mode.refreshRate = 60000; // TODO: can we get refresh rate data from Wayland host?
|
||||
initInterfaces("model_TODO", "manufacturer_TODO", "UUID_TODO", pixelSize, { mode });
|
||||
setGeometry(logicalPosition, pixelSize);
|
||||
|
|
|
@ -34,8 +34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <QCoreApplication>
|
||||
#include <QSocketNotifier>
|
||||
// kwayland
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
// xcb
|
||||
#include <xcb/xcb_keysyms.h>
|
||||
// X11
|
||||
|
|
|
@ -53,10 +53,10 @@ X11WindowedOutput::~X11WindowedOutput()
|
|||
|
||||
void X11WindowedOutput::init(const QPoint &logicalPosition, const QSize &pixelSize)
|
||||
{
|
||||
KWayland::Server::OutputDeviceInterface::Mode mode;
|
||||
KWaylandServer::OutputDeviceInterface::Mode mode;
|
||||
mode.id = 0;
|
||||
mode.size = pixelSize;
|
||||
mode.flags = KWayland::Server::OutputDeviceInterface::ModeFlag::Current;
|
||||
mode.flags = KWaylandServer::OutputDeviceInterface::ModeFlag::Current;
|
||||
mode.refreshRate = 60000; // TODO: get refresh rate via randr
|
||||
|
||||
// Physicial size must be adjusted, such that QPA calculates correct sizes of
|
||||
|
|
|
@ -49,9 +49,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "decorations/decoratedclient.h"
|
||||
#include <logging.h>
|
||||
|
||||
#include <KWayland/Server/buffer_interface.h>
|
||||
#include <KWayland/Server/subcompositor_interface.h>
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWaylandServer/buffer_interface.h>
|
||||
#include <KWaylandServer/subcompositor_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
|
@ -1534,7 +1534,7 @@ OpenGLWindowPixmap::OpenGLWindowPixmap(Scene::Window *window, SceneOpenGL* scene
|
|||
{
|
||||
}
|
||||
|
||||
OpenGLWindowPixmap::OpenGLWindowPixmap(const QPointer<KWayland::Server::SubSurfaceInterface> &subSurface, WindowPixmap *parent, SceneOpenGL *scene)
|
||||
OpenGLWindowPixmap::OpenGLWindowPixmap(const QPointer<KWaylandServer::SubSurfaceInterface> &subSurface, WindowPixmap *parent, SceneOpenGL *scene)
|
||||
: WindowPixmap(subSurface, parent)
|
||||
, m_texture(scene->createTexture())
|
||||
, m_scene(scene)
|
||||
|
@ -1610,7 +1610,7 @@ bool OpenGLWindowPixmap::bind()
|
|||
return success;
|
||||
}
|
||||
|
||||
WindowPixmap *OpenGLWindowPixmap::createChild(const QPointer<KWayland::Server::SubSurfaceInterface> &subSurface)
|
||||
WindowPixmap *OpenGLWindowPixmap::createChild(const QPointer<KWaylandServer::SubSurfaceInterface> &subSurface)
|
||||
{
|
||||
return new OpenGLWindowPixmap(subSurface, this, m_scene);
|
||||
}
|
||||
|
|
|
@ -203,9 +203,9 @@ public:
|
|||
bool bind();
|
||||
bool isValid() const override;
|
||||
protected:
|
||||
WindowPixmap *createChild(const QPointer<KWayland::Server::SubSurfaceInterface> &subSurface) override;
|
||||
WindowPixmap *createChild(const QPointer<KWaylandServer::SubSurfaceInterface> &subSurface) override;
|
||||
private:
|
||||
explicit OpenGLWindowPixmap(const QPointer<KWayland::Server::SubSurfaceInterface> &subSurface, WindowPixmap *parent, SceneOpenGL *scene);
|
||||
explicit OpenGLWindowPixmap(const QPointer<KWaylandServer::SubSurfaceInterface> &subSurface, WindowPixmap *parent, SceneOpenGL *scene);
|
||||
QScopedPointer<SceneOpenGLTexture> m_texture;
|
||||
SceneOpenGL *m_scene;
|
||||
};
|
||||
|
|
|
@ -32,9 +32,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <kwineffectquickview.h>
|
||||
|
||||
#include <KWayland/Server/buffer_interface.h>
|
||||
#include <KWayland/Server/subcompositor_interface.h>
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWaylandServer/buffer_interface.h>
|
||||
#include <KWaylandServer/subcompositor_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
#include "decorations/decoratedclient.h"
|
||||
// Qt
|
||||
#include <QDebug>
|
||||
|
@ -416,7 +416,7 @@ QPainterWindowPixmap::QPainterWindowPixmap(Scene::Window *window)
|
|||
{
|
||||
}
|
||||
|
||||
QPainterWindowPixmap::QPainterWindowPixmap(const QPointer<KWayland::Server::SubSurfaceInterface> &subSurface, WindowPixmap *parent)
|
||||
QPainterWindowPixmap::QPainterWindowPixmap(const QPointer<KWaylandServer::SubSurfaceInterface> &subSurface, WindowPixmap *parent)
|
||||
: WindowPixmap(subSurface, parent)
|
||||
{
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ void QPainterWindowPixmap::create()
|
|||
}
|
||||
}
|
||||
|
||||
WindowPixmap *QPainterWindowPixmap::createChild(const QPointer<KWayland::Server::SubSurfaceInterface> &subSurface)
|
||||
WindowPixmap *QPainterWindowPixmap::createChild(const QPointer<KWaylandServer::SubSurfaceInterface> &subSurface)
|
||||
{
|
||||
return new QPainterWindowPixmap(subSurface, this);
|
||||
}
|
||||
|
|
|
@ -97,9 +97,9 @@ public:
|
|||
const QImage &image();
|
||||
|
||||
protected:
|
||||
WindowPixmap *createChild(const QPointer<KWayland::Server::SubSurfaceInterface> &subSurface) override;
|
||||
WindowPixmap *createChild(const QPointer<KWaylandServer::SubSurfaceInterface> &subSurface) override;
|
||||
private:
|
||||
explicit QPainterWindowPixmap(const QPointer<KWayland::Server::SubSurfaceInterface> &subSurface, WindowPixmap *parent);
|
||||
explicit QPainterWindowPixmap(const QPointer<KWaylandServer::SubSurfaceInterface> &subSurface, WindowPixmap *parent);
|
||||
QImage m_image;
|
||||
};
|
||||
|
||||
|
|
|
@ -36,12 +36,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// KWayland
|
||||
#include <KWayland/Client/connection_thread.h>
|
||||
#include <KWayland/Client/buffer.h>
|
||||
#include <KWayland/Server/buffer_interface.h>
|
||||
#include <KWayland/Server/datadevice_interface.h>
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWayland/Server/pointerconstraints_interface.h>
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWaylandServer/buffer_interface.h>
|
||||
#include <KWaylandServer/datadevice_interface.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
#include <KWaylandServer/pointerconstraints_interface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
// screenlocker
|
||||
#include <KScreenLocker/KsldApp>
|
||||
|
||||
|
@ -150,7 +150,7 @@ void PointerInputRedirection::init()
|
|||
}
|
||||
connect(workspace(), &QObject::destroyed, this, [this] { setInited(false); });
|
||||
connect(waylandServer(), &QObject::destroyed, this, [this] { setInited(false); });
|
||||
connect(waylandServer()->seat(), &KWayland::Server::SeatInterface::dragEnded, this,
|
||||
connect(waylandServer()->seat(), &KWaylandServer::SeatInterface::dragEnded, this,
|
||||
[this] {
|
||||
// need to force a focused pointer change
|
||||
waylandServer()->seat()->setFocusedPointerSurface(nullptr);
|
||||
|
@ -587,14 +587,14 @@ void PointerInputRedirection::focusUpdate(Toplevel *focusOld, Toplevel *focusNow
|
|||
}
|
||||
);
|
||||
|
||||
m_constraintsConnection = connect(focusNow->surface(), &KWayland::Server::SurfaceInterface::pointerConstraintsChanged,
|
||||
m_constraintsConnection = connect(focusNow->surface(), &KWaylandServer::SurfaceInterface::pointerConstraintsChanged,
|
||||
this, &PointerInputRedirection::updatePointerConstraints);
|
||||
m_constraintsActivatedConnection = connect(workspace(), &Workspace::clientActivated,
|
||||
this, &PointerInputRedirection::updatePointerConstraints);
|
||||
updatePointerConstraints();
|
||||
}
|
||||
|
||||
void PointerInputRedirection::breakPointerConstraints(KWayland::Server::SurfaceInterface *surface)
|
||||
void PointerInputRedirection::breakPointerConstraints(KWaylandServer::SurfaceInterface *surface)
|
||||
{
|
||||
// cancel pointer constraints
|
||||
if (surface) {
|
||||
|
@ -681,7 +681,7 @@ void PointerInputRedirection::updatePointerConstraints()
|
|||
if (canConstrain && r.contains(m_pos.toPoint())) {
|
||||
cf->setConfined(true);
|
||||
m_confined = true;
|
||||
m_confinedPointerRegionConnection = connect(cf.data(), &KWayland::Server::ConfinedPointerInterface::regionChanged, this,
|
||||
m_confinedPointerRegionConnection = connect(cf.data(), &KWaylandServer::ConfinedPointerInterface::regionChanged, this,
|
||||
[this] {
|
||||
if (!focus()) {
|
||||
return;
|
||||
|
@ -730,7 +730,7 @@ void PointerInputRedirection::updatePointerConstraints()
|
|||
|
||||
// The client might cancel pointer locking from its side by unbinding the LockedPointerInterface.
|
||||
// In this case the cached cursor position hint must be fetched before the resource goes away
|
||||
m_lockedPointerAboutToBeUnboundConnection = connect(lock.data(), &KWayland::Server::LockedPointerInterface::aboutToBeUnbound, this,
|
||||
m_lockedPointerAboutToBeUnboundConnection = connect(lock.data(), &KWaylandServer::LockedPointerInterface::aboutToBeUnbound, this,
|
||||
[this, lock]() {
|
||||
const auto hint = lock->cursorPositionHint();
|
||||
if (hint.x() < 0 || hint.y() < 0 || !focus()) {
|
||||
|
@ -739,7 +739,7 @@ void PointerInputRedirection::updatePointerConstraints()
|
|||
auto globalHint = focus()->pos() - focus()->clientContentPos() + hint;
|
||||
|
||||
// When the resource finally goes away, reposition the cursor according to the hint
|
||||
connect(lock.data(), &KWayland::Server::LockedPointerInterface::unbound, this,
|
||||
connect(lock.data(), &KWaylandServer::LockedPointerInterface::unbound, this,
|
||||
[this, globalHint]() {
|
||||
processMotion(globalHint, waylandServer()->seat()->timestamp());
|
||||
});
|
||||
|
@ -753,7 +753,7 @@ void PointerInputRedirection::updatePointerConstraints()
|
|||
}
|
||||
}
|
||||
|
||||
void PointerInputRedirection::warpXcbOnSurfaceLeft(KWayland::Server::SurfaceInterface *newSurface)
|
||||
void PointerInputRedirection::warpXcbOnSurfaceLeft(KWaylandServer::SurfaceInterface *newSurface)
|
||||
{
|
||||
auto xc = waylandServer()->xWaylandConnection();
|
||||
if (!xc) {
|
||||
|
@ -947,9 +947,9 @@ CursorImage::CursorImage(PointerInputRedirection *parent)
|
|||
: QObject(parent)
|
||||
, m_pointer(parent)
|
||||
{
|
||||
connect(waylandServer()->seat(), &KWayland::Server::SeatInterface::focusedPointerChanged, this, &CursorImage::update);
|
||||
connect(waylandServer()->seat(), &KWayland::Server::SeatInterface::dragStarted, this, &CursorImage::updateDrag);
|
||||
connect(waylandServer()->seat(), &KWayland::Server::SeatInterface::dragEnded, this,
|
||||
connect(waylandServer()->seat(), &KWaylandServer::SeatInterface::focusedPointerChanged, this, &CursorImage::update);
|
||||
connect(waylandServer()->seat(), &KWaylandServer::SeatInterface::dragStarted, this, &CursorImage::updateDrag);
|
||||
connect(waylandServer()->seat(), &KWaylandServer::SeatInterface::dragEnded, this,
|
||||
[this] {
|
||||
disconnect(m_drag.connection);
|
||||
reevaluteSource();
|
||||
|
@ -1031,7 +1031,7 @@ void CursorImage::update()
|
|||
if (s_cursorUpdateBlocking) {
|
||||
return;
|
||||
}
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
disconnect(m_serverCursor.connection);
|
||||
auto p = waylandServer()->seat()->focusedPointer();
|
||||
if (p) {
|
||||
|
@ -1172,7 +1172,7 @@ void CursorImage::removeWindowSelectionCursor()
|
|||
|
||||
void CursorImage::updateDrag()
|
||||
{
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
disconnect(m_drag.connection);
|
||||
m_drag.cursor = {};
|
||||
reevaluteSource();
|
||||
|
@ -1288,7 +1288,7 @@ void WaylandCursorImage::loadThemeCursor(const T &shape, Image *image)
|
|||
}
|
||||
waylandServer()->internalClientConection()->flush();
|
||||
waylandServer()->dispatch();
|
||||
auto buffer = KWayland::Server::BufferInterface::get(waylandServer()->internalConnection()->getResource(KWayland::Client::Buffer::getId(b)));
|
||||
auto buffer = KWaylandServer::BufferInterface::get(waylandServer()->internalConnection()->getResource(KWayland::Client::Buffer::getId(b)));
|
||||
if (!buffer) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -32,13 +32,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
class QWindow;
|
||||
|
||||
namespace KWayland
|
||||
{
|
||||
namespace Server
|
||||
namespace KWaylandServer
|
||||
{
|
||||
class SurfaceInterface;
|
||||
}
|
||||
}
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -157,12 +154,12 @@ private:
|
|||
void updateToReset();
|
||||
void updatePosition(const QPointF &pos);
|
||||
void updateButton(uint32_t button, InputRedirection::PointerButtonState state);
|
||||
void warpXcbOnSurfaceLeft(KWayland::Server::SurfaceInterface *surface);
|
||||
void warpXcbOnSurfaceLeft(KWaylandServer::SurfaceInterface *surface);
|
||||
QPointF applyPointerConfinement(const QPointF &pos) const;
|
||||
void disconnectConfinedPointerRegionConnection();
|
||||
void disconnectLockedPointerAboutToBeUnboundConnection();
|
||||
void disconnectPointerConstraintsConnection();
|
||||
void breakPointerConstraints(KWayland::Server::SurfaceInterface *surface);
|
||||
void breakPointerConstraints(KWaylandServer::SurfaceInterface *surface);
|
||||
CursorImage *m_cursor;
|
||||
bool m_supportsWarping;
|
||||
QPointF m_pos;
|
||||
|
|
20
scene.cpp
20
scene.cpp
|
@ -81,9 +81,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include "thumbnailitem.h"
|
||||
|
||||
#include <KWayland/Server/buffer_interface.h>
|
||||
#include <KWayland/Server/subcompositor_interface.h>
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWaylandServer/buffer_interface.h>
|
||||
#include <KWaylandServer/subcompositor_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -393,7 +393,7 @@ void Scene::addToplevel(Toplevel *c)
|
|||
connect(c, SIGNAL(windowClosed(KWin::Toplevel*,KWin::Deleted*)), SLOT(windowClosed(KWin::Toplevel*,KWin::Deleted*)));
|
||||
//A change of scale won't affect the geometry in compositor co-ordinates, but will affect the window quads.
|
||||
if (c->surface()) {
|
||||
connect(c->surface(), &KWayland::Server::SurfaceInterface::scaleChanged, this, std::bind(&Scene::windowGeometryShapeChanged, this, c));
|
||||
connect(c->surface(), &KWaylandServer::SurfaceInterface::scaleChanged, this, std::bind(&Scene::windowGeometryShapeChanged, this, c));
|
||||
}
|
||||
connect(c, &Toplevel::screenScaleChanged, this,
|
||||
[this, c] {
|
||||
|
@ -1028,7 +1028,7 @@ WindowPixmap::WindowPixmap(Scene::Window *window)
|
|||
{
|
||||
}
|
||||
|
||||
WindowPixmap::WindowPixmap(const QPointer<KWayland::Server::SubSurfaceInterface> &subSurface, WindowPixmap *parent)
|
||||
WindowPixmap::WindowPixmap(const QPointer<KWaylandServer::SubSurfaceInterface> &subSurface, WindowPixmap *parent)
|
||||
: m_window(parent->m_window)
|
||||
, m_pixmap(XCB_PIXMAP_NONE)
|
||||
, m_discarded(false)
|
||||
|
@ -1045,7 +1045,7 @@ WindowPixmap::~WindowPixmap()
|
|||
xcb_free_pixmap(connection(), m_pixmap);
|
||||
}
|
||||
if (m_buffer) {
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
QObject::disconnect(m_buffer.data(), &BufferInterface::aboutToBeDestroyed, m_buffer.data(), &BufferInterface::unref);
|
||||
m_buffer->unref();
|
||||
}
|
||||
|
@ -1094,7 +1094,7 @@ void WindowPixmap::create()
|
|||
m_window->unreferencePreviousPixmap();
|
||||
}
|
||||
|
||||
WindowPixmap *WindowPixmap::createChild(const QPointer<KWayland::Server::SubSurfaceInterface> &subSurface)
|
||||
WindowPixmap *WindowPixmap::createChild(const QPointer<KWaylandServer::SubSurfaceInterface> &subSurface)
|
||||
{
|
||||
Q_UNUSED(subSurface)
|
||||
return nullptr;
|
||||
|
@ -1110,11 +1110,11 @@ bool WindowPixmap::isValid() const
|
|||
|
||||
void WindowPixmap::updateBuffer()
|
||||
{
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
if (SurfaceInterface *s = surface()) {
|
||||
QVector<WindowPixmap*> oldTree = m_children;
|
||||
QVector<WindowPixmap*> children;
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
const auto subSurfaces = s->childSubSurfaces();
|
||||
for (const auto &subSurface : subSurfaces) {
|
||||
if (subSurface.isNull()) {
|
||||
|
@ -1167,7 +1167,7 @@ void WindowPixmap::updateBuffer()
|
|||
}
|
||||
}
|
||||
|
||||
KWayland::Server::SurfaceInterface *WindowPixmap::surface() const
|
||||
KWaylandServer::SurfaceInterface *WindowPixmap::surface() const
|
||||
{
|
||||
if (!m_subSurface.isNull()) {
|
||||
return m_subSurface->surface().data();
|
||||
|
|
21
scene.h
21
scene.h
|
@ -30,14 +30,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
class QOpenGLFramebufferObject;
|
||||
|
||||
namespace KWayland
|
||||
{
|
||||
namespace Server
|
||||
namespace KWaylandServer
|
||||
{
|
||||
class BufferInterface;
|
||||
class SubSurfaceInterface;
|
||||
}
|
||||
}
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -429,7 +426,7 @@ public:
|
|||
/**
|
||||
* @return The Wayland BufferInterface for this WindowPixmap.
|
||||
*/
|
||||
QPointer<KWayland::Server::BufferInterface> buffer() const;
|
||||
QPointer<KWaylandServer::BufferInterface> buffer() const;
|
||||
const QSharedPointer<QOpenGLFramebufferObject> &fbo() const;
|
||||
QImage internalImage() const;
|
||||
/**
|
||||
|
@ -480,19 +477,19 @@ public:
|
|||
/**
|
||||
* @returns the subsurface this WindowPixmap is for if it is not for a root window
|
||||
*/
|
||||
QPointer<KWayland::Server::SubSurfaceInterface> subSurface() const {
|
||||
QPointer<KWaylandServer::SubSurfaceInterface> subSurface() const {
|
||||
return m_subSurface;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns the surface this WindowPixmap references, might be @c null.
|
||||
*/
|
||||
KWayland::Server::SurfaceInterface *surface() const;
|
||||
KWaylandServer::SurfaceInterface *surface() const;
|
||||
|
||||
protected:
|
||||
explicit WindowPixmap(Scene::Window *window);
|
||||
explicit WindowPixmap(const QPointer<KWayland::Server::SubSurfaceInterface> &subSurface, WindowPixmap *parent);
|
||||
virtual WindowPixmap *createChild(const QPointer<KWayland::Server::SubSurfaceInterface> &subSurface);
|
||||
explicit WindowPixmap(const QPointer<KWaylandServer::SubSurfaceInterface> &subSurface, WindowPixmap *parent);
|
||||
virtual WindowPixmap *createChild(const QPointer<KWaylandServer::SubSurfaceInterface> &subSurface);
|
||||
/**
|
||||
* @return The Window this WindowPixmap belongs to
|
||||
*/
|
||||
|
@ -517,12 +514,12 @@ private:
|
|||
QSize m_pixmapSize;
|
||||
bool m_discarded;
|
||||
QRect m_contentsRect;
|
||||
QPointer<KWayland::Server::BufferInterface> m_buffer;
|
||||
QPointer<KWaylandServer::BufferInterface> m_buffer;
|
||||
QSharedPointer<QOpenGLFramebufferObject> m_fbo;
|
||||
QImage m_internalImage;
|
||||
WindowPixmap *m_parent = nullptr;
|
||||
QVector<WindowPixmap*> m_children;
|
||||
QPointer<KWayland::Server::SubSurfaceInterface> m_subSurface;
|
||||
QPointer<KWaylandServer::SubSurfaceInterface> m_subSurface;
|
||||
};
|
||||
|
||||
class Scene::EffectFrame
|
||||
|
@ -615,7 +612,7 @@ Shadow* Scene::Window::shadow()
|
|||
}
|
||||
|
||||
inline
|
||||
QPointer<KWayland::Server::BufferInterface> WindowPixmap::buffer() const
|
||||
QPointer<KWaylandServer::BufferInterface> WindowPixmap::buffer() const
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
|
|
@ -31,9 +31,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <KDecoration2/Decoration>
|
||||
#include <KDecoration2/DecorationShadow>
|
||||
|
||||
#include <KWayland/Server/buffer_interface.h>
|
||||
#include <KWayland/Server/shadow_interface.h>
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWaylandServer/buffer_interface.h>
|
||||
#include <KWaylandServer/shadow_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
|
||||
#include <QWindow>
|
||||
|
||||
|
@ -239,7 +239,7 @@ bool Shadow::init(KDecoration2::Decoration *decoration)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Shadow::init(const QPointer< KWayland::Server::ShadowInterface > &shadow)
|
||||
bool Shadow::init(const QPointer< KWaylandServer::ShadowInterface > &shadow)
|
||||
{
|
||||
if (!shadow) {
|
||||
return false;
|
||||
|
|
7
shadow.h
7
shadow.h
|
@ -31,13 +31,10 @@ class Decoration;
|
|||
class DecorationShadow;
|
||||
}
|
||||
|
||||
namespace KWayland
|
||||
{
|
||||
namespace Server
|
||||
namespace KWaylandServer
|
||||
{
|
||||
class ShadowInterface;
|
||||
}
|
||||
}
|
||||
|
||||
namespace KWin {
|
||||
|
||||
|
@ -173,7 +170,7 @@ private:
|
|||
static QVector<uint32_t> readX11ShadowProperty(xcb_window_t id);
|
||||
bool init(const QVector<uint32_t> &data);
|
||||
bool init(KDecoration2::Decoration *decoration);
|
||||
bool init(const QPointer<KWayland::Server::ShadowInterface> &shadow);
|
||||
bool init(const QPointer<KWaylandServer::ShadowInterface> &shadow);
|
||||
bool init(const QWindow *window);
|
||||
Toplevel *m_topLevel;
|
||||
// shadow pixmaps
|
||||
|
|
|
@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// KDecoration
|
||||
#include <KDecoration2/Decoration>
|
||||
// KWayland
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
// screenlocker
|
||||
#include <KScreenLocker/KsldApp>
|
||||
// Qt
|
||||
|
|
|
@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "workspace.h"
|
||||
#include "xcbutils.h"
|
||||
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
@ -699,12 +699,12 @@ void Toplevel::setSkipCloseAnimation(bool set)
|
|||
emit skipCloseAnimationChanged();
|
||||
}
|
||||
|
||||
void Toplevel::setSurface(KWayland::Server::SurfaceInterface *surface)
|
||||
void Toplevel::setSurface(KWaylandServer::SurfaceInterface *surface)
|
||||
{
|
||||
if (m_surface == surface) {
|
||||
return;
|
||||
}
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
if (m_surface) {
|
||||
disconnect(m_surface, &SurfaceInterface::damaged, this, &Toplevel::addDamage);
|
||||
disconnect(m_surface, &SurfaceInterface::sizeChanged, this, &Toplevel::discardWindowPixmap);
|
||||
|
|
15
toplevel.h
15
toplevel.h
|
@ -40,13 +40,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
class QOpenGLFramebufferObject;
|
||||
|
||||
namespace KWayland
|
||||
{
|
||||
namespace Server
|
||||
namespace KWaylandServer
|
||||
{
|
||||
class SurfaceInterface;
|
||||
}
|
||||
}
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -279,7 +276,7 @@ class KWIN_EXPORT Toplevel : public QObject
|
|||
* Interface to the Wayland Surface.
|
||||
* Relevant only in Wayland, in X11 it will be nullptr
|
||||
*/
|
||||
Q_PROPERTY(KWayland::Server::SurfaceInterface *surface READ surface)
|
||||
Q_PROPERTY(KWaylandServer::SurfaceInterface *surface READ surface)
|
||||
|
||||
/**
|
||||
* Whether the window is a popup.
|
||||
|
@ -517,8 +514,8 @@ public:
|
|||
void setSkipCloseAnimation(bool set);
|
||||
|
||||
quint32 surfaceId() const;
|
||||
KWayland::Server::SurfaceInterface *surface() const;
|
||||
void setSurface(KWayland::Server::SurfaceInterface *surface);
|
||||
KWaylandServer::SurfaceInterface *surface() const;
|
||||
void setSurface(KWaylandServer::SurfaceInterface *surface);
|
||||
|
||||
const QSharedPointer<QOpenGLFramebufferObject> &internalFramebufferObject() const;
|
||||
QImage internalImageObject() const;
|
||||
|
@ -741,7 +738,7 @@ private:
|
|||
int m_screen;
|
||||
bool m_skipCloseAnimation;
|
||||
quint32 m_surfaceId = 0;
|
||||
KWayland::Server::SurfaceInterface *m_surface = nullptr;
|
||||
KWaylandServer::SurfaceInterface *m_surface = nullptr;
|
||||
// when adding new data members, check also copyToDeleted()
|
||||
qreal m_screenScale = 1.0;
|
||||
};
|
||||
|
@ -998,7 +995,7 @@ inline quint32 Toplevel::surfaceId() const
|
|||
return m_surfaceId;
|
||||
}
|
||||
|
||||
inline KWayland::Server::SurfaceInterface *Toplevel::surface() const
|
||||
inline KWaylandServer::SurfaceInterface *Toplevel::surface() const
|
||||
{
|
||||
return m_surface;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// KDecoration
|
||||
#include <KDecoration2/Decoration>
|
||||
// KWayland
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
// screenlocker
|
||||
#include <KScreenLocker/KsldApp>
|
||||
// Qt
|
||||
|
@ -116,7 +116,7 @@ void TouchInputRedirection::focusUpdate(Toplevel *focusOld, Toplevel *focusNow)
|
|||
|
||||
// TODO: invalidate pointer focus?
|
||||
|
||||
// FIXME: add input transformation API to KWayland::Server::SeatInterface for touch input
|
||||
// FIXME: add input transformation API to KWaylandServer::SeatInterface for touch input
|
||||
seat->setFocusedTouchSurface(focusNow->surface(), -1 * focusNow->inputTransformation().map(focusNow->pos()) + focusNow->pos());
|
||||
m_focusGeometryConnection = connect(focusNow, &Toplevel::frameGeometryChanged, this,
|
||||
[this] {
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <KLocalizedString>
|
||||
#include <NETWM>
|
||||
|
||||
#include <KWayland/Server/plasmavirtualdesktop_interface.h>
|
||||
#include <KWaylandServer/plasmavirtualdesktop_interface.h>
|
||||
// Qt
|
||||
#include <QAction>
|
||||
#include <QUuid>
|
||||
|
@ -53,9 +53,9 @@ VirtualDesktop::~VirtualDesktop()
|
|||
emit aboutToBeDestroyed();
|
||||
}
|
||||
|
||||
void VirtualDesktopManager::setVirtualDesktopManagement(KWayland::Server::PlasmaVirtualDesktopManagementInterface *management)
|
||||
void VirtualDesktopManager::setVirtualDesktopManagement(KWaylandServer::PlasmaVirtualDesktopManagementInterface *management)
|
||||
{
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
Q_ASSERT(!m_virtualDesktopManagement);
|
||||
m_virtualDesktopManagement = management;
|
||||
|
||||
|
|
|
@ -36,13 +36,10 @@ class KLocalizedString;
|
|||
class NETRootInfo;
|
||||
class QAction;
|
||||
|
||||
namespace KWayland
|
||||
{
|
||||
namespace Server
|
||||
namespace KWaylandServer
|
||||
{
|
||||
class PlasmaVirtualDesktopManagementInterface;
|
||||
}
|
||||
}
|
||||
|
||||
namespace KWin {
|
||||
|
||||
|
@ -164,7 +161,7 @@ public:
|
|||
/**
|
||||
* @internal, for Wayland case
|
||||
*/
|
||||
void setVirtualDesktopManagement(KWayland::Server::PlasmaVirtualDesktopManagementInterface *management);
|
||||
void setVirtualDesktopManagement(KWaylandServer::PlasmaVirtualDesktopManagementInterface *management);
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -492,7 +489,7 @@ private:
|
|||
VirtualDesktopGrid m_grid;
|
||||
// TODO: QPointer
|
||||
NETRootInfo *m_rootInfo;
|
||||
KWayland::Server::PlasmaVirtualDesktopManagementInterface *m_virtualDesktopManagement = nullptr;
|
||||
KWaylandServer::PlasmaVirtualDesktopManagementInterface *m_virtualDesktopManagement = nullptr;
|
||||
KSharedConfig::Ptr m_config;
|
||||
|
||||
KWIN_SINGLETON_VARIABLE(VirtualDesktopManager, s_manager)
|
||||
|
|
|
@ -28,10 +28,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "xkb.h"
|
||||
#include "screenlockerwatcher.h"
|
||||
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWayland/Server/textinput_interface.h>
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
#include <KWaylandServer/textinput_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
|
||||
#include <KStatusNotifierItem>
|
||||
#include <KLocalizedString>
|
||||
|
@ -50,7 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// xkbcommon
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
|
|
@ -25,8 +25,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <QVector>
|
||||
// KWayland
|
||||
#include <KWayland/Client/shm_pool.h>
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWayland/Server/output_interface.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
#include <KWaylandServer/output_interface.h>
|
||||
// Wayland
|
||||
#include <wayland-cursor.h>
|
||||
|
||||
|
|
|
@ -36,36 +36,36 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <KWayland/Client/shm_pool.h>
|
||||
#include <KWayland/Client/surface.h>
|
||||
// Server
|
||||
#include <KWayland/Server/appmenu_interface.h>
|
||||
#include <KWayland/Server/compositor_interface.h>
|
||||
#include <KWayland/Server/datadevicemanager_interface.h>
|
||||
#include <KWayland/Server/datasource_interface.h>
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWayland/Server/dpms_interface.h>
|
||||
#include <KWayland/Server/idle_interface.h>
|
||||
#include <KWayland/Server/idleinhibit_interface.h>
|
||||
#include <KWayland/Server/linuxdmabuf_v1_interface.h>
|
||||
#include <KWayland/Server/output_interface.h>
|
||||
#include <KWayland/Server/plasmashell_interface.h>
|
||||
#include <KWayland/Server/plasmavirtualdesktop_interface.h>
|
||||
#include <KWayland/Server/plasmawindowmanagement_interface.h>
|
||||
#include <KWayland/Server/pointerconstraints_interface.h>
|
||||
#include <KWayland/Server/pointergestures_interface.h>
|
||||
#include <KWayland/Server/qtsurfaceextension_interface.h>
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWayland/Server/server_decoration_interface.h>
|
||||
#include <KWayland/Server/server_decoration_palette_interface.h>
|
||||
#include <KWayland/Server/shadow_interface.h>
|
||||
#include <KWayland/Server/subcompositor_interface.h>
|
||||
#include <KWayland/Server/blur_interface.h>
|
||||
#include <KWayland/Server/outputmanagement_interface.h>
|
||||
#include <KWayland/Server/outputconfiguration_interface.h>
|
||||
#include <KWayland/Server/xdgdecoration_interface.h>
|
||||
#include <KWayland/Server/xdgshell_interface.h>
|
||||
#include <KWayland/Server/xdgforeign_interface.h>
|
||||
#include <KWayland/Server/xdgoutput_interface.h>
|
||||
#include <KWayland/Server/keystate_interface.h>
|
||||
#include <KWayland/Server/filtered_display.h>
|
||||
#include <KWaylandServer/appmenu_interface.h>
|
||||
#include <KWaylandServer/compositor_interface.h>
|
||||
#include <KWaylandServer/datadevicemanager_interface.h>
|
||||
#include <KWaylandServer/datasource_interface.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
#include <KWaylandServer/dpms_interface.h>
|
||||
#include <KWaylandServer/idle_interface.h>
|
||||
#include <KWaylandServer/idleinhibit_interface.h>
|
||||
#include <KWaylandServer/linuxdmabuf_v1_interface.h>
|
||||
#include <KWaylandServer/output_interface.h>
|
||||
#include <KWaylandServer/plasmashell_interface.h>
|
||||
#include <KWaylandServer/plasmavirtualdesktop_interface.h>
|
||||
#include <KWaylandServer/plasmawindowmanagement_interface.h>
|
||||
#include <KWaylandServer/pointerconstraints_interface.h>
|
||||
#include <KWaylandServer/pointergestures_interface.h>
|
||||
#include <KWaylandServer/qtsurfaceextension_interface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
#include <KWaylandServer/server_decoration_interface.h>
|
||||
#include <KWaylandServer/server_decoration_palette_interface.h>
|
||||
#include <KWaylandServer/shadow_interface.h>
|
||||
#include <KWaylandServer/subcompositor_interface.h>
|
||||
#include <KWaylandServer/blur_interface.h>
|
||||
#include <KWaylandServer/outputmanagement_interface.h>
|
||||
#include <KWaylandServer/outputconfiguration_interface.h>
|
||||
#include <KWaylandServer/xdgdecoration_interface.h>
|
||||
#include <KWaylandServer/xdgshell_interface.h>
|
||||
#include <KWaylandServer/xdgforeign_interface.h>
|
||||
#include <KWaylandServer/xdgoutput_interface.h>
|
||||
#include <KWaylandServer/keystate_interface.h>
|
||||
#include <KWaylandServer/filtered_display.h>
|
||||
|
||||
// KF
|
||||
#include <KServiceTypeTrader>
|
||||
|
@ -85,7 +85,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
//screenlocker
|
||||
#include <KScreenLocker/KsldApp>
|
||||
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -95,7 +95,7 @@ KWIN_SINGLETON_FACTORY(WaylandServer)
|
|||
WaylandServer::WaylandServer(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
qRegisterMetaType<KWayland::Server::OutputInterface::DpmsMode>();
|
||||
qRegisterMetaType<KWaylandServer::OutputInterface::DpmsMode>();
|
||||
}
|
||||
|
||||
WaylandServer::~WaylandServer()
|
||||
|
@ -185,16 +185,16 @@ void WaylandServer::createSurface(T *surface)
|
|||
}
|
||||
|
||||
//not directly connected as the connection is tied to client instead of this
|
||||
connect(m_XdgForeign, &KWayland::Server::XdgForeignInterface::transientChanged, client, [this](KWayland::Server::SurfaceInterface *child) {
|
||||
connect(m_XdgForeign, &KWaylandServer::XdgForeignInterface::transientChanged, client, [this](KWaylandServer::SurfaceInterface *child) {
|
||||
emit foreignTransientChanged(child);
|
||||
});
|
||||
}
|
||||
|
||||
class KWinDisplay : public KWayland::Server::FilteredDisplay
|
||||
class KWinDisplay : public KWaylandServer::FilteredDisplay
|
||||
{
|
||||
public:
|
||||
KWinDisplay(QObject *parent)
|
||||
: KWayland::Server::FilteredDisplay(parent)
|
||||
: KWaylandServer::FilteredDisplay(parent)
|
||||
{}
|
||||
|
||||
static QByteArray sha256(const QString &fileName)
|
||||
|
@ -209,7 +209,7 @@ public:
|
|||
return QByteArray();
|
||||
}
|
||||
|
||||
bool isTrustedOrigin(KWayland::Server::ClientConnection *client) const {
|
||||
bool isTrustedOrigin(KWaylandServer::ClientConnection *client) const {
|
||||
const auto fullPathSha = sha256(client->executablePath());
|
||||
const auto localSha = sha256(QLatin1String("/proc/") + QString::number(client->processId()) + QLatin1String("/exe"));
|
||||
const bool trusted = !localSha.isEmpty() && fullPathSha == localSha;
|
||||
|
@ -221,7 +221,7 @@ public:
|
|||
return trusted;
|
||||
}
|
||||
|
||||
QStringList fetchRequestedInterfaces(KWayland::Server::ClientConnection *client) const {
|
||||
QStringList fetchRequestedInterfaces(KWaylandServer::ClientConnection *client) const {
|
||||
const auto serviceQuery = QStringLiteral("exist Exec and exist [X-KDE-Wayland-Interfaces] and '%1' =~ Exec").arg(client->executablePath());
|
||||
const auto servicesFound = KServiceTypeTrader::self()->query(QStringLiteral("Application"), serviceQuery);
|
||||
|
||||
|
@ -237,7 +237,7 @@ public:
|
|||
|
||||
QSet<QByteArray> interfacesBlackList = {"org_kde_kwin_remote_access_manager", "org_kde_plasma_window_management", "org_kde_kwin_fake_input", "org_kde_kwin_keystate"};
|
||||
|
||||
bool allowInterface(KWayland::Server::ClientConnection *client, const QByteArray &interfaceName) override {
|
||||
bool allowInterface(KWaylandServer::ClientConnection *client, const QByteArray &interfaceName) override {
|
||||
if (client->processId() == getpid()) {
|
||||
return true;
|
||||
}
|
||||
|
@ -431,7 +431,7 @@ bool WaylandServer::init(const QByteArray &socketName, InitializationFlags flags
|
|||
|
||||
m_outputManagement = m_display->createOutputManagement(m_display);
|
||||
connect(m_outputManagement, &OutputManagementInterface::configurationChangeRequested,
|
||||
this, [](KWayland::Server::OutputConfigurationInterface *config) {
|
||||
this, [](KWaylandServer::OutputConfigurationInterface *config) {
|
||||
kwinApp()->platform()->requestOutputsChange(config);
|
||||
});
|
||||
m_outputManagement->create();
|
||||
|
@ -450,7 +450,7 @@ bool WaylandServer::init(const QByteArray &socketName, InitializationFlags flags
|
|||
return true;
|
||||
}
|
||||
|
||||
KWayland::Server::LinuxDmabufUnstableV1Interface *WaylandServer::linuxDmabuf()
|
||||
KWaylandServer::LinuxDmabufUnstableV1Interface *WaylandServer::linuxDmabuf()
|
||||
{
|
||||
if (!m_linuxDmabuf) {
|
||||
m_linuxDmabuf = m_display->createLinuxDmabufInterface(m_display);
|
||||
|
@ -482,7 +482,7 @@ void WaylandServer::initWorkspace()
|
|||
if (m_windowManagement) {
|
||||
connect(workspace(), &Workspace::showingDesktopChanged, this,
|
||||
[this] (bool set) {
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
m_windowManagement->setShowingDesktopState(set ?
|
||||
PlasmaWindowManagementInterface::ShowingDesktopState::Enabled :
|
||||
PlasmaWindowManagementInterface::ShowingDesktopState::Disabled
|
||||
|
@ -537,7 +537,7 @@ void WaylandServer::initScreenLocker()
|
|||
ScreenLocker::KSldApp::self()->setWaylandFd(clientFd);
|
||||
|
||||
for (auto *seat : m_display->seats()) {
|
||||
connect(seat, &KWayland::Server::SeatInterface::timestampChanged,
|
||||
connect(seat, &KWaylandServer::SeatInterface::timestampChanged,
|
||||
screenLockerApp, &ScreenLocker::KSldApp::userActivity);
|
||||
}
|
||||
}
|
||||
|
@ -552,7 +552,7 @@ void WaylandServer::initScreenLocker()
|
|||
}
|
||||
|
||||
for (auto *seat : m_display->seats()) {
|
||||
disconnect(seat, &KWayland::Server::SeatInterface::timestampChanged,
|
||||
disconnect(seat, &KWaylandServer::SeatInterface::timestampChanged,
|
||||
screenLockerApp, &ScreenLocker::KSldApp::userActivity);
|
||||
}
|
||||
ScreenLocker::KSldApp::self()->setWaylandFd(-1);
|
||||
|
@ -585,7 +585,7 @@ int WaylandServer::createScreenLockerConnection()
|
|||
return -1;
|
||||
}
|
||||
m_screenLockerClientConnection = socket.connection;
|
||||
connect(m_screenLockerClientConnection, &KWayland::Server::ClientConnection::disconnected,
|
||||
connect(m_screenLockerClientConnection, &KWaylandServer::ClientConnection::disconnected,
|
||||
this, [this] { m_screenLockerClientConnection = nullptr; });
|
||||
return socket.fd;
|
||||
}
|
||||
|
@ -597,7 +597,7 @@ int WaylandServer::createXWaylandConnection()
|
|||
return -1;
|
||||
}
|
||||
m_xwayland.client = socket.connection;
|
||||
m_xwayland.destroyConnection = connect(m_xwayland.client, &KWayland::Server::ClientConnection::disconnected, this,
|
||||
m_xwayland.destroyConnection = connect(m_xwayland.client, &KWaylandServer::ClientConnection::disconnected, this,
|
||||
[] {
|
||||
qFatal("Xwayland Connection died");
|
||||
}
|
||||
|
@ -715,7 +715,7 @@ static AbstractClient *findClientInList(const QList<AbstractClient *> &clients,
|
|||
return *it;
|
||||
}
|
||||
|
||||
static AbstractClient *findClientInList(const QList<AbstractClient *> &clients, KWayland::Server::SurfaceInterface *surface)
|
||||
static AbstractClient *findClientInList(const QList<AbstractClient *> &clients, KWaylandServer::SurfaceInterface *surface)
|
||||
{
|
||||
auto it = std::find_if(clients.begin(), clients.end(),
|
||||
[surface] (AbstractClient *c) {
|
||||
|
|
105
wayland_server.h
105
wayland_server.h
|
@ -41,7 +41,8 @@ class DataDeviceManager;
|
|||
class ShmPool;
|
||||
class Surface;
|
||||
}
|
||||
namespace Server
|
||||
}
|
||||
namespace KWaylandServer
|
||||
{
|
||||
class AppMenuManagerInterface;
|
||||
class ClientConnection;
|
||||
|
@ -71,7 +72,7 @@ class LinuxDmabufUnstableV1Interface;
|
|||
class LinuxDmabufUnstableV1Buffer;
|
||||
class TabletManagerInterface;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -97,48 +98,48 @@ public:
|
|||
bool init(const QByteArray &socketName = QByteArray(), InitializationFlags flags = InitializationFlag::NoOptions);
|
||||
void terminateClientConnections();
|
||||
|
||||
KWayland::Server::Display *display() {
|
||||
KWaylandServer::Display *display() {
|
||||
return m_display;
|
||||
}
|
||||
KWayland::Server::CompositorInterface *compositor() {
|
||||
KWaylandServer::CompositorInterface *compositor() {
|
||||
return m_compositor;
|
||||
}
|
||||
KWayland::Server::SeatInterface *seat() {
|
||||
KWaylandServer::SeatInterface *seat() {
|
||||
return m_seat;
|
||||
}
|
||||
KWayland::Server::TabletManagerInterface *tabletManager()
|
||||
KWaylandServer::TabletManagerInterface *tabletManager()
|
||||
{
|
||||
return m_tabletManager;
|
||||
}
|
||||
KWayland::Server::DataDeviceManagerInterface *dataDeviceManager() {
|
||||
KWaylandServer::DataDeviceManagerInterface *dataDeviceManager() {
|
||||
return m_dataDeviceManager;
|
||||
}
|
||||
KWayland::Server::PlasmaVirtualDesktopManagementInterface *virtualDesktopManagement() {
|
||||
KWaylandServer::PlasmaVirtualDesktopManagementInterface *virtualDesktopManagement() {
|
||||
return m_virtualDesktopManagement;
|
||||
}
|
||||
KWayland::Server::PlasmaWindowManagementInterface *windowManagement() {
|
||||
KWaylandServer::PlasmaWindowManagementInterface *windowManagement() {
|
||||
return m_windowManagement;
|
||||
}
|
||||
KWayland::Server::ServerSideDecorationManagerInterface *decorationManager() const {
|
||||
KWaylandServer::ServerSideDecorationManagerInterface *decorationManager() const {
|
||||
return m_decorationManager;
|
||||
}
|
||||
KWayland::Server::XdgOutputManagerInterface *xdgOutputManager() const {
|
||||
KWaylandServer::XdgOutputManagerInterface *xdgOutputManager() const {
|
||||
return m_xdgOutputManager;
|
||||
}
|
||||
KWayland::Server::LinuxDmabufUnstableV1Interface *linuxDmabuf();
|
||||
KWaylandServer::LinuxDmabufUnstableV1Interface *linuxDmabuf();
|
||||
|
||||
QList<AbstractClient *> clients() const {
|
||||
return m_clients;
|
||||
}
|
||||
void removeClient(AbstractClient *c);
|
||||
AbstractClient *findClient(quint32 id) const;
|
||||
AbstractClient *findClient(KWayland::Server::SurfaceInterface *surface) const;
|
||||
XdgShellClient *findXdgShellClient(KWayland::Server::SurfaceInterface *surface) const;
|
||||
AbstractClient *findClient(KWaylandServer::SurfaceInterface *surface) const;
|
||||
XdgShellClient *findXdgShellClient(KWaylandServer::SurfaceInterface *surface) const;
|
||||
|
||||
/**
|
||||
* @returns a transient parent of a surface imported with the foreign protocol, if any
|
||||
*/
|
||||
KWayland::Server::SurfaceInterface *findForeignTransientForSurface(KWayland::Server::SurfaceInterface *surface);
|
||||
KWaylandServer::SurfaceInterface *findForeignTransientForSurface(KWaylandServer::SurfaceInterface *surface);
|
||||
|
||||
/**
|
||||
* @returns file descriptor for Xwayland to connect to.
|
||||
|
@ -169,16 +170,16 @@ public:
|
|||
void createInternalConnection();
|
||||
void initWorkspace();
|
||||
|
||||
KWayland::Server::ClientConnection *xWaylandConnection() const {
|
||||
KWaylandServer::ClientConnection *xWaylandConnection() const {
|
||||
return m_xwayland.client;
|
||||
}
|
||||
KWayland::Server::ClientConnection *inputMethodConnection() const {
|
||||
KWaylandServer::ClientConnection *inputMethodConnection() const {
|
||||
return m_inputMethodServerConnection;
|
||||
}
|
||||
KWayland::Server::ClientConnection *internalConnection() const {
|
||||
KWaylandServer::ClientConnection *internalConnection() const {
|
||||
return m_internalConnection.server;
|
||||
}
|
||||
KWayland::Server::ClientConnection *screenLockerClientConnection() const {
|
||||
KWaylandServer::ClientConnection *screenLockerClientConnection() const {
|
||||
return m_screenLockerClientConnection;
|
||||
}
|
||||
KWayland::Client::Compositor *internalCompositor() {
|
||||
|
@ -200,7 +201,7 @@ public:
|
|||
return m_internalConnection.registry;
|
||||
}
|
||||
void dispatch();
|
||||
quint32 createWindowId(KWayland::Server::SurfaceInterface *surface);
|
||||
quint32 createWindowId(KWaylandServer::SurfaceInterface *surface);
|
||||
|
||||
/**
|
||||
* Struct containing information for a created Wayland connection through a
|
||||
|
@ -210,7 +211,7 @@ public:
|
|||
/**
|
||||
* ServerSide Connection
|
||||
*/
|
||||
KWayland::Server::ClientConnection *connection = nullptr;
|
||||
KWaylandServer::ClientConnection *connection = nullptr;
|
||||
/**
|
||||
* client-side file descriptor for the socket
|
||||
*/
|
||||
|
@ -224,13 +225,13 @@ public:
|
|||
void simulateUserActivity();
|
||||
void updateKeyState(KWin::Xkb::LEDs leds);
|
||||
|
||||
QSet<KWayland::Server::LinuxDmabufUnstableV1Buffer*> linuxDmabufBuffers() const {
|
||||
QSet<KWaylandServer::LinuxDmabufUnstableV1Buffer*> linuxDmabufBuffers() const {
|
||||
return m_linuxDmabufBuffers;
|
||||
}
|
||||
void addLinuxDmabufBuffer(KWayland::Server::LinuxDmabufUnstableV1Buffer *buffer) {
|
||||
void addLinuxDmabufBuffer(KWaylandServer::LinuxDmabufUnstableV1Buffer *buffer) {
|
||||
m_linuxDmabufBuffers << buffer;
|
||||
}
|
||||
void removeLinuxDmabufBuffer(KWayland::Server::LinuxDmabufUnstableV1Buffer *buffer) {
|
||||
void removeLinuxDmabufBuffer(KWaylandServer::LinuxDmabufUnstableV1Buffer *buffer) {
|
||||
m_linuxDmabufBuffers.remove(buffer);
|
||||
}
|
||||
|
||||
|
@ -239,42 +240,42 @@ Q_SIGNALS:
|
|||
void shellClientRemoved(KWin::AbstractClient *);
|
||||
void terminatingInternalClientConnection();
|
||||
void initialized();
|
||||
void foreignTransientChanged(KWayland::Server::SurfaceInterface *child);
|
||||
void foreignTransientChanged(KWaylandServer::SurfaceInterface *child);
|
||||
|
||||
private:
|
||||
int createScreenLockerConnection();
|
||||
void shellClientShown(Toplevel *t);
|
||||
quint16 createClientId(KWayland::Server::ClientConnection *c);
|
||||
quint16 createClientId(KWaylandServer::ClientConnection *c);
|
||||
void destroyInternalConnection();
|
||||
template <class T>
|
||||
void createSurface(T *surface);
|
||||
void initScreenLocker();
|
||||
KWayland::Server::Display *m_display = nullptr;
|
||||
KWayland::Server::CompositorInterface *m_compositor = nullptr;
|
||||
KWayland::Server::SeatInterface *m_seat = nullptr;
|
||||
KWayland::Server::TabletManagerInterface *m_tabletManager = nullptr;
|
||||
KWayland::Server::DataDeviceManagerInterface *m_dataDeviceManager = nullptr;
|
||||
KWayland::Server::XdgShellInterface *m_xdgShell = nullptr;
|
||||
KWayland::Server::PlasmaShellInterface *m_plasmaShell = nullptr;
|
||||
KWayland::Server::PlasmaWindowManagementInterface *m_windowManagement = nullptr;
|
||||
KWayland::Server::PlasmaVirtualDesktopManagementInterface *m_virtualDesktopManagement = nullptr;
|
||||
KWayland::Server::ServerSideDecorationManagerInterface *m_decorationManager = nullptr;
|
||||
KWayland::Server::OutputManagementInterface *m_outputManagement = nullptr;
|
||||
KWayland::Server::AppMenuManagerInterface *m_appMenuManager = nullptr;
|
||||
KWayland::Server::ServerSideDecorationPaletteManagerInterface *m_paletteManager = nullptr;
|
||||
KWayland::Server::IdleInterface *m_idle = nullptr;
|
||||
KWayland::Server::XdgOutputManagerInterface *m_xdgOutputManager = nullptr;
|
||||
KWayland::Server::XdgDecorationManagerInterface *m_xdgDecorationManager = nullptr;
|
||||
KWayland::Server::LinuxDmabufUnstableV1Interface *m_linuxDmabuf = nullptr;
|
||||
QSet<KWayland::Server::LinuxDmabufUnstableV1Buffer*> m_linuxDmabufBuffers;
|
||||
KWaylandServer::Display *m_display = nullptr;
|
||||
KWaylandServer::CompositorInterface *m_compositor = nullptr;
|
||||
KWaylandServer::SeatInterface *m_seat = nullptr;
|
||||
KWaylandServer::TabletManagerInterface *m_tabletManager = nullptr;
|
||||
KWaylandServer::DataDeviceManagerInterface *m_dataDeviceManager = nullptr;
|
||||
KWaylandServer::XdgShellInterface *m_xdgShell = nullptr;
|
||||
KWaylandServer::PlasmaShellInterface *m_plasmaShell = nullptr;
|
||||
KWaylandServer::PlasmaWindowManagementInterface *m_windowManagement = nullptr;
|
||||
KWaylandServer::PlasmaVirtualDesktopManagementInterface *m_virtualDesktopManagement = nullptr;
|
||||
KWaylandServer::ServerSideDecorationManagerInterface *m_decorationManager = nullptr;
|
||||
KWaylandServer::OutputManagementInterface *m_outputManagement = nullptr;
|
||||
KWaylandServer::AppMenuManagerInterface *m_appMenuManager = nullptr;
|
||||
KWaylandServer::ServerSideDecorationPaletteManagerInterface *m_paletteManager = nullptr;
|
||||
KWaylandServer::IdleInterface *m_idle = nullptr;
|
||||
KWaylandServer::XdgOutputManagerInterface *m_xdgOutputManager = nullptr;
|
||||
KWaylandServer::XdgDecorationManagerInterface *m_xdgDecorationManager = nullptr;
|
||||
KWaylandServer::LinuxDmabufUnstableV1Interface *m_linuxDmabuf = nullptr;
|
||||
QSet<KWaylandServer::LinuxDmabufUnstableV1Buffer*> m_linuxDmabufBuffers;
|
||||
struct {
|
||||
KWayland::Server::ClientConnection *client = nullptr;
|
||||
KWaylandServer::ClientConnection *client = nullptr;
|
||||
QMetaObject::Connection destroyConnection;
|
||||
} m_xwayland;
|
||||
KWayland::Server::ClientConnection *m_inputMethodServerConnection = nullptr;
|
||||
KWayland::Server::ClientConnection *m_screenLockerClientConnection = nullptr;
|
||||
KWaylandServer::ClientConnection *m_inputMethodServerConnection = nullptr;
|
||||
KWaylandServer::ClientConnection *m_screenLockerClientConnection = nullptr;
|
||||
struct {
|
||||
KWayland::Server::ClientConnection *server = nullptr;
|
||||
KWaylandServer::ClientConnection *server = nullptr;
|
||||
KWayland::Client::ConnectionThread *client = nullptr;
|
||||
QThread *clientThread = nullptr;
|
||||
KWayland::Client::Registry *registry = nullptr;
|
||||
|
@ -285,12 +286,12 @@ private:
|
|||
bool interfacesAnnounced = false;
|
||||
|
||||
} m_internalConnection;
|
||||
KWayland::Server::XdgForeignInterface *m_XdgForeign = nullptr;
|
||||
KWayland::Server::KeyStateInterface *m_keyState = nullptr;
|
||||
KWaylandServer::XdgForeignInterface *m_XdgForeign = nullptr;
|
||||
KWaylandServer::KeyStateInterface *m_keyState = nullptr;
|
||||
QList<AbstractClient *> m_clients;
|
||||
QHash<KWayland::Server::ClientConnection*, quint16> m_clientIds;
|
||||
QHash<KWaylandServer::ClientConnection*, quint16> m_clientIds;
|
||||
InitializationFlags m_initFlags;
|
||||
QVector<KWayland::Server::PlasmaShellSurfaceInterface*> m_plasmaShellSurfaces;
|
||||
QVector<KWaylandServer::PlasmaShellSurfaceInterface*> m_plasmaShellSurfaces;
|
||||
KWIN_SINGLETON(WaylandServer)
|
||||
};
|
||||
|
||||
|
|
|
@ -36,19 +36,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <KDecoration2/DecoratedClient>
|
||||
#include <KDecoration2/Decoration>
|
||||
#include <KWayland/Server/appmenu_interface.h>
|
||||
#include <KWayland/Server/buffer_interface.h>
|
||||
#include <KWayland/Server/clientconnection.h>
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWayland/Server/plasmashell_interface.h>
|
||||
#include <KWayland/Server/plasmawindowmanagement_interface.h>
|
||||
#include <KWayland/Server/qtsurfaceextension_interface.h>
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWayland/Server/server_decoration_interface.h>
|
||||
#include <KWayland/Server/server_decoration_palette_interface.h>
|
||||
#include <KWayland/Server/shadow_interface.h>
|
||||
#include <KWayland/Server/surface_interface.h>
|
||||
#include <KWayland/Server/xdgdecoration_interface.h>
|
||||
#include <KWaylandServer/appmenu_interface.h>
|
||||
#include <KWaylandServer/buffer_interface.h>
|
||||
#include <KWaylandServer/clientconnection.h>
|
||||
#include <KWaylandServer/display.h>
|
||||
#include <KWaylandServer/plasmashell_interface.h>
|
||||
#include <KWaylandServer/plasmawindowmanagement_interface.h>
|
||||
#include <KWaylandServer/qtsurfaceextension_interface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
#include <KWaylandServer/server_decoration_interface.h>
|
||||
#include <KWaylandServer/server_decoration_palette_interface.h>
|
||||
#include <KWaylandServer/shadow_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
#include <KWaylandServer/xdgdecoration_interface.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
|
||||
|
@ -59,7 +59,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
Q_DECLARE_METATYPE(NET::WindowType)
|
||||
|
||||
using namespace KWayland::Server;
|
||||
using namespace KWaylandServer;
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -168,7 +168,7 @@ void XdgShellClient::init()
|
|||
updateShadow();
|
||||
connect(surface(), &SurfaceInterface::shadowChanged, this, &Toplevel::updateShadow);
|
||||
|
||||
connect(waylandServer(), &WaylandServer::foreignTransientChanged, this, [this](KWayland::Server::SurfaceInterface *child) {
|
||||
connect(waylandServer(), &WaylandServer::foreignTransientChanged, this, [this](KWaylandServer::SurfaceInterface *child) {
|
||||
if (child == surface()) {
|
||||
handleTransientForChanged();
|
||||
}
|
||||
|
@ -455,7 +455,7 @@ void XdgShellClient::updateDecoration(bool check_workspace_pos, bool force)
|
|||
} else
|
||||
destroyDecoration();
|
||||
if (m_serverDecoration && isDecorated()) {
|
||||
m_serverDecoration->setMode(KWayland::Server::ServerSideDecorationManagerInterface::Mode::Server);
|
||||
m_serverDecoration->setMode(KWaylandServer::ServerSideDecorationManagerInterface::Mode::Server);
|
||||
}
|
||||
if (m_xdgDecoration) {
|
||||
auto mode = isDecorated() || m_userNoBorder ? XdgDecorationInterface::Mode::ServerSide: XdgDecorationInterface::Mode::ClientSide;
|
||||
|
@ -1791,7 +1791,7 @@ QMatrix4x4 XdgShellClient::inputTransformation() const
|
|||
return matrix;
|
||||
}
|
||||
|
||||
void XdgShellClient::installServerSideDecoration(KWayland::Server::ServerSideDecorationInterface *deco)
|
||||
void XdgShellClient::installServerSideDecoration(KWaylandServer::ServerSideDecorationInterface *deco)
|
||||
{
|
||||
if (m_serverDecoration == deco) {
|
||||
return;
|
||||
|
@ -1856,7 +1856,7 @@ bool XdgShellClient::shouldExposeToWindowManagement()
|
|||
return true;
|
||||
}
|
||||
|
||||
KWayland::Server::XdgShellSurfaceInterface::States XdgShellClient::xdgSurfaceStates() const
|
||||
KWaylandServer::XdgShellSurfaceInterface::States XdgShellClient::xdgSurfaceStates() const
|
||||
{
|
||||
XdgShellSurfaceInterface::States states;
|
||||
if (isActive()) {
|
||||
|
|
|
@ -24,11 +24,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include "abstract_client.h"
|
||||
|
||||
#include <KWayland/Server/xdgshell_interface.h>
|
||||
#include <KWaylandServer/xdgshell_interface.h>
|
||||
|
||||
namespace KWayland
|
||||
{
|
||||
namespace Server
|
||||
namespace KWaylandServer
|
||||
{
|
||||
class ServerSideDecorationInterface;
|
||||
class ServerSideDecorationPaletteInterface;
|
||||
|
@ -36,7 +34,6 @@ class AppMenuInterface;
|
|||
class PlasmaShellSurfaceInterface;
|
||||
class XdgDecorationInterface;
|
||||
}
|
||||
}
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -54,8 +51,8 @@ class KWIN_EXPORT XdgShellClient : public AbstractClient
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
XdgShellClient(KWayland::Server::XdgShellSurfaceInterface *surface);
|
||||
XdgShellClient(KWayland::Server::XdgShellPopupInterface *surface);
|
||||
XdgShellClient(KWaylandServer::XdgShellSurfaceInterface *surface);
|
||||
XdgShellClient(KWaylandServer::XdgShellPopupInterface *surface);
|
||||
~XdgShellClient() override;
|
||||
|
||||
QRect inputGeometry() const override;
|
||||
|
@ -121,11 +118,11 @@ public:
|
|||
bool supportsWindowRules() const override;
|
||||
void destroyClient() override;
|
||||
|
||||
void installPlasmaShellSurface(KWayland::Server::PlasmaShellSurfaceInterface *surface);
|
||||
void installServerSideDecoration(KWayland::Server::ServerSideDecorationInterface *decoration);
|
||||
void installAppMenu(KWayland::Server::AppMenuInterface *appmenu);
|
||||
void installPalette(KWayland::Server::ServerSideDecorationPaletteInterface *palette);
|
||||
void installXdgDecoration(KWayland::Server::XdgDecorationInterface *decoration);
|
||||
void installPlasmaShellSurface(KWaylandServer::PlasmaShellSurfaceInterface *surface);
|
||||
void installServerSideDecoration(KWaylandServer::ServerSideDecorationInterface *decoration);
|
||||
void installAppMenu(KWaylandServer::AppMenuInterface *appmenu);
|
||||
void installPalette(KWaylandServer::ServerSideDecorationPaletteInterface *palette);
|
||||
void installXdgDecoration(KWaylandServer::XdgDecorationInterface *decoration);
|
||||
|
||||
protected:
|
||||
void addDamage(const QRegion &damage) override;
|
||||
|
@ -146,13 +143,13 @@ private Q_SLOTS:
|
|||
void handleWindowClassChanged(const QByteArray &windowClass);
|
||||
void handleWindowGeometryChanged(const QRect &windowGeometry);
|
||||
void handleWindowTitleChanged(const QString &title);
|
||||
void handleMoveRequested(KWayland::Server::SeatInterface *seat, quint32 serial);
|
||||
void handleResizeRequested(KWayland::Server::SeatInterface *seat, quint32 serial, Qt::Edges edges);
|
||||
void handleMoveRequested(KWaylandServer::SeatInterface *seat, quint32 serial);
|
||||
void handleResizeRequested(KWaylandServer::SeatInterface *seat, quint32 serial, Qt::Edges edges);
|
||||
void handleMinimizeRequested();
|
||||
void handleMaximizeRequested(bool maximized);
|
||||
void handleFullScreenRequested(bool fullScreen, KWayland::Server::OutputInterface *output);
|
||||
void handleWindowMenuRequested(KWayland::Server::SeatInterface *seat, quint32 serial, const QPoint &surfacePos);
|
||||
void handleGrabRequested(KWayland::Server::SeatInterface *seat, quint32 serial);
|
||||
void handleFullScreenRequested(bool fullScreen, KWaylandServer::OutputInterface *output);
|
||||
void handleWindowMenuRequested(KWaylandServer::SeatInterface *seat, quint32 serial, const QPoint &surfacePos);
|
||||
void handleGrabRequested(KWaylandServer::SeatInterface *seat, quint32 serial);
|
||||
void handlePingDelayed(quint32 serial);
|
||||
void handlePingTimeout(quint32 serial);
|
||||
void handlePongReceived(quint32 serial);
|
||||
|
@ -172,7 +169,7 @@ private:
|
|||
void updateIcon();
|
||||
bool shouldExposeToWindowManagement();
|
||||
void updateClientOutputs();
|
||||
KWayland::Server::XdgShellSurfaceInterface::States xdgSurfaceStates() const;
|
||||
KWaylandServer::XdgShellSurfaceInterface::States xdgSurfaceStates() const;
|
||||
void updateShowOnScreenEdge();
|
||||
void updateMaximizeMode(MaximizeMode maximizeMode);
|
||||
// called on surface commit and processes all m_pendingConfigureRequests up to m_lastAckedConfigureReqest
|
||||
|
@ -189,8 +186,8 @@ private:
|
|||
QRect adjustMoveGeometry(const QRect &rect) const;
|
||||
QRect adjustResizeGeometry(const QRect &rect) const;
|
||||
|
||||
KWayland::Server::XdgShellSurfaceInterface *m_xdgShellToplevel;
|
||||
KWayland::Server::XdgShellPopupInterface *m_xdgShellPopup;
|
||||
KWaylandServer::XdgShellSurfaceInterface *m_xdgShellToplevel;
|
||||
KWaylandServer::XdgShellPopupInterface *m_xdgShellPopup;
|
||||
|
||||
QRect m_bufferGeometry;
|
||||
QRect m_windowGeometry;
|
||||
|
@ -221,11 +218,11 @@ private:
|
|||
quint32 m_windowId = 0;
|
||||
bool m_unmapped = true;
|
||||
NET::WindowType m_windowType = NET::Normal;
|
||||
QPointer<KWayland::Server::PlasmaShellSurfaceInterface> m_plasmaShellSurface;
|
||||
QPointer<KWayland::Server::AppMenuInterface> m_appMenuInterface;
|
||||
QPointer<KWayland::Server::ServerSideDecorationPaletteInterface> m_paletteInterface;
|
||||
KWayland::Server::ServerSideDecorationInterface *m_serverDecoration = nullptr;
|
||||
KWayland::Server::XdgDecorationInterface *m_xdgDecoration = nullptr;
|
||||
QPointer<KWaylandServer::PlasmaShellSurfaceInterface> m_plasmaShellSurface;
|
||||
QPointer<KWaylandServer::AppMenuInterface> m_appMenuInterface;
|
||||
QPointer<KWaylandServer::ServerSideDecorationPaletteInterface> m_paletteInterface;
|
||||
KWaylandServer::ServerSideDecorationInterface *m_serverDecoration = nullptr;
|
||||
KWaylandServer::XdgDecorationInterface *m_xdgDecoration = nullptr;
|
||||
bool m_userNoBorder = false;
|
||||
bool m_fullScreen = false;
|
||||
bool m_transient = false;
|
||||
|
|
6
xkb.cpp
6
xkb.cpp
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// frameworks
|
||||
#include <KConfigGroup>
|
||||
// KWayland
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
// Qt
|
||||
#include <QTemporaryFile>
|
||||
#include <QKeyEvent>
|
||||
|
@ -573,9 +573,9 @@ quint32 Xkb::numberOfLayouts() const
|
|||
return xkb_keymap_num_layouts(m_keymap);
|
||||
}
|
||||
|
||||
void Xkb::setSeat(KWayland::Server::SeatInterface *seat)
|
||||
void Xkb::setSeat(KWaylandServer::SeatInterface *seat)
|
||||
{
|
||||
m_seat = QPointer<KWayland::Server::SeatInterface>(seat);
|
||||
m_seat = QPointer<KWaylandServer::SeatInterface>(seat);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue