summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
diff options
context:
space:
mode:
authorRafael Roquetto <rafael.roquetto.qnx@kdab.com>2012-12-11 16:10:01 -0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-28 17:31:12 +0100
commit9fbecf11c7c5f7c059d6ba84c3da1458eaee608d (patch)
treef102e3bfbd21f89b084559ed01a601b29aa65bed /src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
parent55cf7c577da015bd6d48a034902477b83cf73be7 (diff)
QNX: QQnxCursor implementation.
Implementation of QQnxCursor, a QPlatformCursor subclass. Due to the lack of a proper cursor API from the underlying OS, this class only caches the current cursor position to make sure that the QCursor class works properly. This is a backport of 290ed7f8fafd67197f773454223410bbe57fc4d3. At the time there weren't any known bugs regarding this, so it was committed to "dev" branch as a feature. Now we needed it in "stable", otherwise menus don't work correctly, due to QCursor::pos() being bogus. Change-Id: I5a4217c92a0aaed0b22b45ca3c4e0fad882e810f Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
index 4412bb34bd..2d3c7608bf 100644
--- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
@@ -347,6 +347,8 @@ void QQnxScreenEventHandler::handleTouchEvent(screen_event_t event, int qnxType)
qFatal("QQNX: failed to query event position, errno=%d", errno);
}
+ QCursor::setPos(pos[0], pos[1]);
+
// get window coordinates of touch
errno = 0;
int windowPos[2];