summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xlib/qxlibcursor.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-03-05 14:42:42 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-07 22:43:43 +0100
commitb319d44798fe4c5aa8b859966d64f28b08be28dd (patch)
treefc24d20ebff32b89f02e0390950fc33f38f7e972 /src/plugins/platforms/xlib/qxlibcursor.h
parentb7915a4d0d97a60fc30e55eb4cc1b10e7fe9ce2f (diff)
QCursor: Associate cursor with screen.
- Introduce cursor() accessor to QPlatformScreen. - Remove screen member of QPlatformCursor (a cursor can be shared by multiple screens of a virtual desktop). - Add QCursor::pos()/ QCursor::setPos() taking a QScreen-parameter, use primaryScreen() for old overloads. QCursor::pos() can then query the platform cursor for the position and return the position even if the mouse position is outside the windows owned by the Qt application. - Fix tests Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Task-number: QTBUG-22457 Task-number: QTBUG-22565 Task-number: QTBUG-20753 Change-Id: Ia69f37343f95772e934eab1cd806bd54cbdbbe51 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xlib/qxlibcursor.h')
-rw-r--r--src/plugins/platforms/xlib/qxlibcursor.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/xlib/qxlibcursor.h b/src/plugins/platforms/xlib/qxlibcursor.h
index 92e42ac7a1..0056aa9554 100644
--- a/src/plugins/platforms/xlib/qxlibcursor.h
+++ b/src/plugins/platforms/xlib/qxlibcursor.h
@@ -48,7 +48,7 @@
QT_BEGIN_NAMESPACE
-class QXlibCursor : QPlatformCursor
+class QXlibCursor : public QPlatformCursor
{
public:
QXlibCursor(QXlibScreen *screen);
@@ -59,8 +59,9 @@ private:
Cursor createCursorBitmap(QCursor * cursor);
Cursor createCursorShape(int cshape);
- QXlibScreen *testLiteScreen() const;
+ QXlibScreen *testLiteScreen() const { return m_screen; }
QMap<int, Cursor> cursorMap;
+ QXlibScreen *m_screen;
};
QT_END_NAMESPACE