xcb: implement QXcbCursor::size()
A follow up of baed8534bc1dac36a9d0ef4240fc14398076a192 . Fixes: QTBUG-118612 Pick-to: 6.5 6.2 Change-Id: I7b4a2276c6e6a14d5413f6cd64d801de11cc8c3e Reviewed-by: JiDe Zhang <zhangjide@uniontech.com> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 78272c667f008f6afcf5f84e0add525b56c3a558) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
bad32e1f06
commit
199540dd57
@ -10,6 +10,7 @@
|
||||
#include <QtGui/QWindow>
|
||||
#include <QtGui/QBitmap>
|
||||
#include <QtGui/private/qguiapplication_p.h>
|
||||
#include <qpa/qplatformtheme.h>
|
||||
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
#include <X11/cursorfont.h>
|
||||
@ -288,6 +289,13 @@ QXcbCursor::~QXcbCursor()
|
||||
xcb_cursor_context_free(m_cursorContext);
|
||||
}
|
||||
|
||||
QSize QXcbCursor::size() const
|
||||
{
|
||||
if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme())
|
||||
return theme->themeHint(QPlatformTheme::MouseCursorSize).toSize();
|
||||
return QSize(24, 24);
|
||||
}
|
||||
|
||||
void QXcbCursor::updateContext()
|
||||
{
|
||||
if (m_cursorContext)
|
||||
|
@ -48,6 +48,8 @@ public:
|
||||
QPoint pos() const override;
|
||||
void setPos(const QPoint &pos) override;
|
||||
|
||||
QSize size() const override;
|
||||
|
||||
void updateContext();
|
||||
|
||||
static void queryPointer(QXcbConnection *c, QXcbVirtualDesktop **virtualDesktop, QPoint *pos, int *keybMask = nullptr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user