Support showing the mouse cursor in the VNC plugin

Change-Id: I380e36b3a814db7ba779d998260d1a75d1d20e0c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
bb10
Lars Knoll 2015-12-17 00:22:27 +01:00 committed by Andy Nichols
parent 53f7e565db
commit a1dbf346e6
3 changed files with 10 additions and 4 deletions

View File

@ -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;

View File

@ -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

View File

@ -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;