summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbcursor.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-11-12 16:30:05 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-12-14 16:33:34 +0000
commit1d03ed3f2b6cdad2719b66b056c4c6be2018c460 (patch)
treeba80ac855faa9cf765ba98d11d58201b841f17cd /src/plugins/platforms/xcb/qxcbcursor.h
parent3c8cf550740746a0b6e8ed77569c8c57c9c14f6b (diff)
Make native cursor handles accessible.
Add QWindowsNativeInterface::nativeResourceForCursor() and implement for Windows (returning the HCURSOR) and XCB (returning the xcb_cursor). Task-number: QTBUG-49386 Change-Id: I963869f6e8741449822ecbe6489f9c42a786c7a6 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbcursor.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbcursor.h b/src/plugins/platforms/xcb/qxcbcursor.h
index 3c6dece1f2..f6c1d9db90 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.h
+++ b/src/plugins/platforms/xcb/qxcbcursor.h
@@ -77,6 +77,11 @@ public:
static void queryPointer(QXcbConnection *c, QXcbVirtualDesktop **virtualDesktop, QPoint *pos, int *keybMask = 0);
+#ifndef QT_NO_CURSOR
+ xcb_cursor_t xcbCursor(const QCursor &c) const
+ { return m_cursorHash.value(QXcbCursorCacheKey(c), xcb_cursor_t(0)); }
+#endif
+
private:
#ifndef QT_NO_CURSOR
typedef QHash<QXcbCursorCacheKey, xcb_cursor_t> CursorHash;