summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandwindow_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/qwaylandwindow_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/qwaylandwindow_p.h')
-rw-r--r--src/client/qwaylandwindow_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index 701a9cdf6..3f35a1eba 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -168,7 +168,7 @@ public:
inline bool isMaximized() const { return mState == Qt::WindowMaximized; }
inline bool isFullscreen() const { return mState == Qt::WindowFullScreen; }
- void setMouseCursor(QWaylandInputDevice *device, Qt::CursorShape shape);
+ void setMouseCursor(QWaylandInputDevice *device, const QCursor &cursor);
void restoreMouseCursor(QWaylandInputDevice *device);
QWaylandWindow *transientParent() const;
@@ -206,7 +206,7 @@ protected:
QWaylandAbstractDecoration *mWindowDecoration;
bool mMouseEventsInContentArea;
Qt::MouseButtons mMousePressedInContentArea;
- Qt::CursorShape m_cursorShape;
+ QCursor m_cursor;
WId mWindowId;
bool mWaitingForFrameSync;