Commit 775d3c7a authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

Let the framebuffer provide the cursor position

In the piperwire case, we get it through pipewire, not QCursor. Still
default to QCursor for xcb and qt backends.
parent 18f98326
......@@ -10,8 +10,7 @@
#include "framebuffer.h"
#include <config-krfb.h>
#include <X11/Xutil.h>
#include <QCursor>
FrameBuffer::FrameBuffer(WId id, QObject *parent)
......@@ -73,3 +72,8 @@ void FrameBuffer::startMonitor()
void FrameBuffer::stopMonitor()
{
}
QPoint FrameBuffer::cursorPosition()
{
return QCursor::pos();
}
......@@ -42,10 +42,12 @@ public:
virtual int depth();
virtual void startMonitor();
virtual void stopMonitor();
virtual QPoint cursorPosition();
virtual void getServerFormat(rfbPixelFormat &format);
virtual QVariant customProperty(const QString &property) const;
Q_SIGNALS:
void frameBufferChanged();
......
......@@ -146,7 +146,7 @@ void RfbServerManager::updateFrameBuffer()
void RfbServerManager::updateScreens()
{
QList<QRect> rects = d->fb->modifiedTiles();
QPoint currentCursorPos = QCursor::pos();
const QPoint currentCursorPos = d->fb->cursorPosition();
for (RfbServer* server : std::as_const(d->servers)) {
server->updateScreen(rects);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment