diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-03-10 08:29:37 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-03-14 09:24:31 +0000 |
commit | 3bf655e5960c8f0ac4cb8b99a671886b824c7191 (patch) | |
tree | 4f01f8abe022da61ae101ea5e5dc459446973b9b /src/platformsupport/input/libinput/qlibinputhandler.cpp | |
parent | 00c09aaf5bac2ae2ee46b20bfbb4b46379ba90e7 (diff) |
Support QCursor::setPos() properly for eglfs
The internal state of the input handlers need updating too. This was not possible
in the past due to the one way communication from the input handlers (that are
potentially loaded as interface-less generic plugins), but using our new private
QInputDeviceManager in QtGui we can now easily implement "talking back" from QtGui
to the input handlers, regardless of them being plugins or compiled in.
The rest of setPos() is in place already for eglfs.
linuxfb will be handled in follow-up patches.
Task-number: QTBUG-44856
Change-Id: Id72fdb8b1ea176ddfe082e466e7a538a2a98a005
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'src/platformsupport/input/libinput/qlibinputhandler.cpp')
-rw-r--r-- | src/platformsupport/input/libinput/qlibinputhandler.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/platformsupport/input/libinput/qlibinputhandler.cpp b/src/platformsupport/input/libinput/qlibinputhandler.cpp index 22b08960df..1a64ad5a30 100644 --- a/src/platformsupport/input/libinput/qlibinputhandler.cpp +++ b/src/platformsupport/input/libinput/qlibinputhandler.cpp @@ -107,6 +107,9 @@ QLibInputHandler::QLibInputHandler(const QString &key, const QString &spec) m_keyboard.reset(new QLibInputKeyboard); m_touch.reset(new QLibInputTouch); + connect(QGuiApplicationPrivate::inputDeviceManager(), SIGNAL(cursorPositionChangeRequested(QPoint)), + this, SLOT(onCursorPositionChangeRequested(QPoint))); + // Process the initial burst of DEVICE_ADDED events. onReadyRead(); } @@ -227,4 +230,9 @@ void QLibInputHandler::processEvent(libinput_event *ev) } } +void QLibInputHandler::onCursorPositionChangeRequested(const QPoint &pos) +{ + m_pointer->setPos(pos); +} + QT_END_NAMESPACE |