Commit bafb03bd authored by Martin Flöser's avatar Martin Flöser
Browse files

Drop global position from PointerInterface

No longer needed, not even as a convenience wrapper.
parent d425515a
......@@ -326,7 +326,7 @@ void TestWaylandSeat::testPointer()
// test motion
m_seatInterface->setTimestamp(1);
serverPointer->setGlobalPos(QPoint(10, 16));
m_seatInterface->setPointerPos(QPoint(10, 16));
QVERIFY(motionSpy.wait());
QCOMPARE(motionSpy.first().first().toPoint(), QPoint(0, 1));
QCOMPARE(motionSpy.first().last().value<quint32>(), quint32(1));
......
......@@ -73,7 +73,6 @@ PointerInterface::PointerInterface(SeatInterface *parent, wl_resource *parentRes
wl_fixed_from_double(pos.x()), wl_fixed_from_double(pos.y()));
}
});
connect(parent, &SeatInterface::pointerPosChanged, this, &PointerInterface::globalPosChanged);
}
PointerInterface::~PointerInterface() = default;
......@@ -104,12 +103,6 @@ void PointerInterface::setFocusedSurface(SurfaceInterface *surface, quint32 seri
wl_fixed_from_double(pos.x()), wl_fixed_from_double(pos.y()));
}
void PointerInterface::setGlobalPos(const QPointF &pos)
{
Q_D();
d->seat->setPointerPos(pos);
}
void PointerInterface::buttonPressed(quint32 button, quint32 serial)
{
Q_D();
......@@ -151,12 +144,6 @@ void PointerInterface::Private::releaseCallback(wl_client *client, wl_resource *
unbind(resource);
}
QPointF PointerInterface::globalPos() const
{
Q_D();
return d->seat->pointerPos();
}
PointerInterface::Private *PointerInterface::d_func() const
{
return reinterpret_cast<Private*>(d.data());
......
......@@ -35,28 +35,9 @@ class SurfaceInterface;
class KWAYLANDSERVER_EXPORT PointerInterface : public Resource
{
Q_OBJECT
Q_PROPERTY(QPointF globalPos READ globalPos WRITE setGlobalPos NOTIFY globalPosChanged)
public:
virtual ~PointerInterface();
/**
* Convenient method to set the pointer position of the SeatInterface.
* @see SeatInterface::setPointerPos
**/
void setGlobalPos(const QPointF &pos);
/**
* Convenient method to get the pointer position of the SeatInterface.
* @see SeatInterface::pointerPos
**/
QPointF globalPos() const;
Q_SIGNALS:
/**
* Convenient signal emitted when the SeatInterface's pointer position changes.
* @see SeatInterface::pointerPosChanged
**/
void globalPosChanged(const QPointF &pos);
private:
void setFocusedSurface(SurfaceInterface *surface, quint32 serial);
SurfaceInterface *focusedSurface() const;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment