mirror of
https://invent.kde.org/network/kdeconnect-kde.git
synced 2026-03-01 18:23:24 +01:00
This plugin provides synergy-like behavior of sharing input devices between machines by moving the cursor seamlessly between them. To this end this uses the InputCapture Portal to be notified when the cursor moves 'out of the screen'. For forwarding input the existing mousepad infrastructure is used. On the other side a tiny hidden plugin listens to mouse events to track when input should pass back to source machine.
32 lines
695 B
C++
32 lines
695 B
C++
/**
|
|
* SPDX-FileCopyrightText: 2024 David Redondo <kde@david-redondo.de>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QLine>
|
|
#include <QObject>
|
|
#include <QPointF>
|
|
|
|
#include <core/kdeconnectplugin.h>
|
|
|
|
class InputCaptureSession;
|
|
class QScreen;
|
|
|
|
class ShareInputDevicesPlugin : public KdeConnectPlugin
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
ShareInputDevicesPlugin(QObject *parent, const QVariantList &args);
|
|
|
|
void receivePacket(const NetworkPacket &np) override;
|
|
QString dbusPath() const override;
|
|
|
|
private:
|
|
Qt::Edge configuredEdge() const;
|
|
InputCaptureSession *m_inputCaptureSession;
|
|
QLine m_activatedBarrier;
|
|
};
|