summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-12-17 00:22:27 +0100
committerAndy Nichols <andy.nichols@qt.io>2016-06-28 10:18:19 +0000
commita1dbf346e6f1dc6c539d43bfa40b1aa78772ecdd (patch)
tree39b89e90cc57e488679a69461b642bd65519aab6 /src
parent53f7e565db860a9993c79139b941999d206f0b1d (diff)
Support showing the mouse cursor in the VNC plugin
Change-Id: I380e36b3a814db7ba779d998260d1a75d1d20e0c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/vnc/qvnc.cpp3
-rw-r--r--src/plugins/platforms/vnc/qvncintegration.cpp9
-rw-r--r--src/plugins/platforms/vnc/qvncscreen.h2
3 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/platforms/vnc/qvnc.cpp b/src/plugins/platforms/vnc/qvnc.cpp
index 6948344701..d01d53b2f8 100644
--- a/src/plugins/platforms/vnc/qvnc.cpp
+++ b/src/plugins/platforms/vnc/qvnc.cpp
@@ -681,7 +681,6 @@ void QVncServer::setDirty()
void QVncServer::newConnection()
{
- QT_VNC_DEBUG() << "!!!!!!!!!!!! new connection";
if (client)
delete client;
@@ -1023,12 +1022,10 @@ void QVncServer::setEncodings()
break;
case Cursor:
supportCursor = true;
-#ifndef QT_NO_QWS_CURSOR
if (!qvnc_screen->screen()) {
delete qvnc_cursor;
qvnc_cursor = new QVncClientCursor(this);
}
-#endif
break;
case DesktopSize:
supportDesktopSize = true;
diff --git a/src/plugins/platforms/vnc/qvncintegration.cpp b/src/plugins/platforms/vnc/qvncintegration.cpp
index adef5423a5..ee224bd36a 100644
--- a/src/plugins/platforms/vnc/qvncintegration.cpp
+++ b/src/plugins/platforms/vnc/qvncintegration.cpp
@@ -48,7 +48,7 @@
#include <QtGui/private/qguiapplication_p.h>
#include <qpa/qplatforminputcontextfactory_p.h>
-
+#include <private/qinputdevicemanager_p_p.h>
#ifndef QT_NO_LIBINPUT
#include <QtPlatformSupport/private/qlibinputhandler_p.h>
#endif
@@ -80,6 +80,13 @@ void QVncIntegration::initialize()
m_inputContext = QPlatformInputContextFactory::create();
m_nativeInterface.reset(new QPlatformNativeInterface);
+
+ // we always have exactly one mouse and keyboard
+ QInputDeviceManagerPrivate::get(QGuiApplicationPrivate::inputDeviceManager())->setDeviceCount(
+ QInputDeviceManager::DeviceTypePointer, 1);
+ QInputDeviceManagerPrivate::get(QGuiApplicationPrivate::inputDeviceManager())->setDeviceCount(
+ QInputDeviceManager::DeviceTypeKeyboard, 1);
+
}
bool QVncIntegration::hasCapability(QPlatformIntegration::Capability cap) const
diff --git a/src/plugins/platforms/vnc/qvncscreen.h b/src/plugins/platforms/vnc/qvncscreen.h
index bad6910a75..5911121169 100644
--- a/src/plugins/platforms/vnc/qvncscreen.h
+++ b/src/plugins/platforms/vnc/qvncscreen.h
@@ -64,6 +64,8 @@ public:
QRegion doRedraw() Q_DECL_OVERRIDE;
QImage *image() const { return mScreenImage; }
+// QPlatformCursor *cursor() const Q_DECL_OVERRIDE { return mCursor; }
+
void clearDirty() { dirtyRegion = QRegion(); }
QStringList mArgs;