diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-06-07 15:38:45 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-06-08 14:47:22 +0200 |
commit | 4469de4ce7a72ab6824629bfe8483131aaf22137 (patch) | |
tree | cc5b1c11c0681975e972f2d6aeab80e106d328c8 /src/gui/kernel/qplatformcursor_qpa.cpp | |
parent | 88f3b059a935d1ce7735a5ae082c256619eea8c1 (diff) |
Cursor support in xcb plug-in.
Custom cursor pixmaps with depth greater than 1 are not yet supported
and will be converted to monochrome always.
Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/gui/kernel/qplatformcursor_qpa.cpp')
-rw-r--r-- | src/gui/kernel/qplatformcursor_qpa.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformcursor_qpa.cpp b/src/gui/kernel/qplatformcursor_qpa.cpp index b3994103fe..4c98098898 100644 --- a/src/gui/kernel/qplatformcursor_qpa.cpp +++ b/src/gui/kernel/qplatformcursor_qpa.cpp @@ -98,6 +98,21 @@ QPlatformCursor::QPlatformCursor(QPlatformScreen *scr ) QPlatformCursorPrivate::instances.append(this); } +extern int qt_last_x; +extern int qt_last_y; + +QPoint QPlatformCursor::pos() const +{ + // As a fallback return the last mouse position seen by QGuiApplication. + return QPoint(qt_last_x, qt_last_y); +} + +void QPlatformCursor::setPos(const QPoint &pos) +{ + Q_UNUSED(pos); + qWarning("This plugin does not support QCursor::setPos()"); +} + // End of display and pointer event handling code // Beginning of built-in cursor graphics // from src/gui/embedded/QGraphicsSystemCursorImage_qws.cpp |