diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/qwaylandcursor.cpp | 10 | ||||
-rw-r--r-- | src/client/qwaylandcursor_p.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/client/qwaylandcursor.cpp b/src/client/qwaylandcursor.cpp index 83b240ce5..09e2e1010 100644 --- a/src/client/qwaylandcursor.cpp +++ b/src/client/qwaylandcursor.cpp @@ -8,6 +8,9 @@ #include "qwaylandinputdevice_p.h" #include "qwaylandshmbackingstore_p.h" +#include <QtGui/private/qguiapplication_p.h> +#include <qpa/qplatformtheme.h> + #include <QtGui/QImageReader> #include <QDebug> @@ -336,6 +339,13 @@ void QWaylandCursor::setPos(const QPoint &pos) qCWarning(lcQpaWayland) << "Setting cursor position is not possible on wayland"; } +QSize QWaylandCursor::size() const +{ + if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) + return theme->themeHint(QPlatformTheme::MouseCursorSize).toSize(); + return QSize(24, 24); +} + } // namespace QtWaylandClient QT_END_NAMESPACE diff --git a/src/client/qwaylandcursor_p.h b/src/client/qwaylandcursor_p.h index 8f4a5b7e5..1f6d5109e 100644 --- a/src/client/qwaylandcursor_p.h +++ b/src/client/qwaylandcursor_p.h @@ -106,6 +106,8 @@ public: QPoint pos() const override; void setPos(const QPoint &pos) override; + QSize size() const override; + static QSharedPointer<QWaylandBuffer> cursorBitmapBuffer(QWaylandDisplay *display, const QCursor *cursor); protected: |