summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandcursor_p.h
diff options
context:
space:
mode:
authorMartin Gräßlin <mgraesslin@kde.org>2016-03-02 11:04:10 +0100
committerMartin Gräßlin <mgraesslin@kde.org>2016-03-17 06:40:40 +0000
commit9cbd553eeb758bb060514f17d4615003da16429a (patch)
treec5dfb0fbf3f510881155150532bb51c7c1bf49e5 /src/client/qwaylandcursor_p.h
parent759822f33f56acb3e2bacf19c6431ea4fa2be229 (diff)
Add support for bitmap cursors
So far QtWayland did not support custom bitmap/pixmap QCursors. This change adds support for them by creating a QWaylandShmBuffer and copying the pixmap data into that buffer. The internal API to set cursors images is changed to not only rely on wl_cursor_image, but also allow to just set the buffer with a specific size and a hot spot. The created WaylandShmBuffer is passed around as a shared pointer, so that it can be automatically cleaned up once the cursor image is no longer used on any seat. Task-number: QTBUG-51604 Change-Id: I1f1ee87f03186c3d564468d3e8ea2a3141d7e2fb Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@theqtcompany.com>
Diffstat (limited to 'src/client/qwaylandcursor_p.h')
-rw-r--r--src/client/qwaylandcursor_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/qwaylandcursor_p.h b/src/client/qwaylandcursor_p.h
index 0cc1173f8..9e06cf626 100644
--- a/src/client/qwaylandcursor_p.h
+++ b/src/client/qwaylandcursor_p.h
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
+class QWaylandBuffer;
class QWaylandDisplay;
class QWaylandScreen;
@@ -72,6 +73,7 @@ public:
void setPos(const QPoint &pos);
struct wl_cursor_image *cursorImage(Qt::CursorShape shape);
+ QSharedPointer<QWaylandBuffer> cursorBitmapImage(const QCursor *cursor);
private:
enum WaylandCursor {